Hello, @dinasset. Ages since we have corresponded. Rectangular tiling, in the event that memory serves
.
Alas, Methinks we deal with a feature, not a bug.
First, to purposes. fx_houghsketchbw
visualizes voting tallies called theta-rho maps, after the Greek letters (Īø,Ļ). These inventory the orientations and displacements from origins of lines traversing two-dimensional planes. Hough surveys images and produces such inventories. Here is how the scheme goes along.
First, consider one line from such an inventory:

A rotation, Īø, then a displacement, Ļ, from the origin to the traversing line ā at the intersection, and crossing at right angles ā serves to uniquely identify L, the traversing line. Most of us would reach for the more familiar slope ( m ) and y-axis intercept ( b ), from y = mx + b to classify lines, but infinite slopes, possessed by those lines perpendicular to the x axis, pose computational difficulties in many practical settings. See Wikipediaās Hough transform for the sordid details. For that reason, we frequently turn to this theta-rho tabulation, as these parameters can readily cope with vertical orientations.
As it is a unique numeric pair, we can readily situate L on a theta-rho map, using (Īø,Ļ) as coordinates:

with Īø being āx-likeā and Ļ being āy-likeā.
The lot of GāMICās hough command is to survey arbitrary images and tabulate āsomething akinā to theta-rho maps ā the differences in encoding between such maps and what hough
actually produces I beg not to take up now, but the essential gist of it is that a great deal of up-voting occurs at (Īø,Ļ) intersects in the theta-rho map corresponding to lines where a great many pixels align. That strong upvote is what hough
tabulates, part-and-parcel with its mission of extracting line-like features out of images. The strong upvotes identify the strong lines of interest.
fx_houghsketchbw
is a bit of whimsy that reverse-engineers the maps that hough
produces, drawing the strong lines of interest as listed in the tabulation. What is obtained from this reverse engineering is an image that ghosts the original ā that is the whimsy part. It is as if I was constrained only to drawing lines of select orientations and displacements. This trio of images illustrate what hough
and fx_houghsketchbw
are about:
It is worth noting the image metrics of the voting tally image:
thetarho
:
[1] = 'thetarho':
size = (512,512,1,1) [1024 Kio of float32].
data = (3.31251,11.0466,0,0,5.50909,0,0,3.29881,2.28675,0,6.16836,0,(...),0,0,0,0,0,0,0,0,0,0,0,0).
min = 0, max = 390.875, mean = 4.21341, std = 9.46725, coords_min = (2,0,0,0), coords_max = (189,259,0,0).
Consider iM
=390.875. That suggests the presence of a line at some (Īø,Ļ) intersect which has received nearly 400 votes ā a strong candidate, I suspect it may correspond to a hough-line coincident, or nearly so, to where her right cheek contrasts with her hair. Other candidates are possible, and all are of the ilk of nearly line-like features coincident with like strong features in the original image.
Let us now take up the consequences of framing:
The frame introduces four horizontal and four vertical edges that each contrast with surrounding ambient luminance and run nearly the length and width of the image ā Just the sort of feature that garners high votes in
hough's
tally. Indeed, image metrics of the framed-image theta-rho map tells us as much:
[2] = 'thetarho':
size = (666,666,1,1) [1732 Kio of float32].
data = (15.9612,4.91599,11.0466,0,0,0,0,2.00368,3.4665,3.29881,4.92585,0,(...),0,0,0,0,0,0,0,0,0,0,0,0).
min = 0, max = 67601.8, mean = 4.50687, std = 251.885, coords_min = (3,0,0,0), coords_max = (0,379,0,0).
A (Īø,Ļ) intersect with an intensity of 67,601.8 garners nearly 173 times the up-votes of the strongest linear feature in the previous image, that of face sans frame. The image of the theta-rho map concludes the story: eight bright dots that, with their five figure intensities, mark the eight edges comprising the border and swamp all the other votes. Since the pipeline culls relatively low-vote (Īø,Ļ) intersects, most lines that would otherwise construct the face are dropped out: they are low-vote noise. Quod erat demonstrandum.
So the ābugā coincides with the quintessential design of hough.
There may be difficulties in convincing @David_Tschumperle to fix such.
Perhaps, then, reverse the operations of fx_houghsketchbw
and fx_frame_blur
? To wit: sketch the original, then frame, instead of framing the original, then sketching? Or am I missing something?
Have fun, however you may proceed.