This is where the comment comes from: In VIPS/NIP2, one can control how convolutions---this includes Gaussian blur---is done. I've found that if I use a low-bit LUT, I can see artifacts in the final shape: the boundary is not as smooth as it should be (when looked at with a "magnifier"). No such artifacts if I use a float LUT. I've not checked the internals of Gaussian blur in IM, so I issued the warning in case one has the option of goind "very cheap" in the convolution department.fmw42 wrote:Sorry I am not following this. There would not seem to be a need for a lut approach to a gaussian blur as IM has functions -blur (separable) and -gaussian (2d) blurs already. Both have both radius and sigma, though really only sigma is needed.nicholas wrote:Yes. It is really that simple. Just make sure you use a fairly high quality (and large radius) Gaussian blur. With a fast and cheap approximation (using a sparse and low bit-depth LUT) there are artifacts because the thresholding is very permissive, and the blur radius large.
Let's assume that the final shape will be black on white, and that we are not computing in reverse video. "Permissive" means that something that is almost white (within 2% of being white, for example) is still considered part of the shape, hence turned to black by the thresholding. "Restrictive" means that in order to be part of the shape, a pixel has to be very close to black before thresholding.fmw42 wrote:Please explain what you mean by permissive in your context of thresholding. I presume you are thresholding the graylevels in the image after the blur so as to cut down the size of the blurred object and convert to binary. From your paper you mention 2% and 5%. This should be easy with -threshold, unless I misunderstand you technique.
Things are somewhat confusing because theorists discuss shapes as if they were masks, that is, the shape is implicitly white on a black background. (This makes sense because "1", that is, white, corresponds to being part of the shape.) So, I tried to write the article so that what is written make sense no matter whether one is theorizing or computing. (Possibly, I failed.)
But it does look like you understand perfectly.
As far as generating seed point locations go, accuracy is not an issue at all. Any uniform distribution on [0,1] can be used and fed into the formulas to get points uniformly distributed in the unit disk (this is the formula with a cosine and a sine), then scaled by the "inner" canvas size. Provided the noise has the proper distribution, it should be just fine. To get a binormally distributed sequence of seed points, you probably can simply scale the Gaussian noise instead of using the formula based on the Box-Muller formula.fmw42 wrote: The hard part here seems to be your complicated formulae for ensuring random values for the coordinates. IM has a random function in -fx that allows random numbers to be generated within the range 0 to 1. I don't know how to convert those to uniform or gaussian distributions. You have some equations for involving sin, cos, log, etc (not numbered on page 3 (not numbered), which probably could be implemented in -fx. However, IM can generate both uniform and gaussian noise in an image and one can take a series of pixels from that image and get the values to use for the coordinates. But I don't know how accurate these distributions are within IM. So precision/accuracy may be an issue.
Fred
Note that although the Gaussian distribution gives more "natural" looking shapes, I find the two uniform distributions more "artistic," especially with few seed points.