I do not see any method to get the pixel values from MoI Image, underlying some curve.
Unless there is some way to translate MoI coordinates into canvas Image coordinates.
Assume the curve is horizontal, beginning at the left of the MoI Image, and extending to the right of the MoI Image.
Let the number of horizontal pixels in the canvas image be hNum, and the number of vertical pixels in the canvas image be vNum.
Place hNum+1 points on the curve, as an array. The array index is the canvas Image x coordinate.
Figure out the vertical pixel value by dividing the image vertically into vNum+1 parts... ... to get the canvas Image y coordinate. (constant)
Figure out which vertical division the curve passes through.
Then the luminosity for each point on the curve can be looked up from the canvas Image, using the canvas methods .data.
Use the pixels values as per the algorithm outline from previous post. Fix the algorithm of course.
Max's Heightmap uses canvas context.
The pixel values are available, as per Ed's 1+ links.
- Brian
All MoI Points in some rectangle would be above one canvas image pixel.
For each canvas image pixel, there would be a rectangle in MoI, with all points in the rectangle above said pixel.
There is a lot that I do not understand.
|