c++ - How to obtain pixels along math function? -


I have an OpenCV image, a mathematical function such as x ^ 2 and a set of discrete calculation points with this function. How do I get the pixels of underlying discrete digits? Since calculation numbers are of type cv: Point2d () for example (4.2823, 7.2442), I do not know how to map the referenced pixels for it.

Not sure if I was clear enough, just tell me thank you in advance!

You need to map the function's range (like X [5, 5], y [ -25,25], fxmin = -5 and fymin = -25) for the coordinates of the image. Assuming the left and the lowest coordinate of the image xLeftImg = 0, yLowImg = img.ySize () -1, then the computation will be

  imgpos_x = (point2d.x-fx_min) / (.fxmax -fxmin) * img.size () width; Imgpos_y = img.size (). Height- (point2d.y-fy_min) / (Phimenks-Femin) * img.size (). Height;  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -