Get sub pixel crop from ofImage

I am currently using img.cropFrom() to get a sub section of a live camera feed. this is then used in for other openCV manipulation.

The cropped selection is defined by an ever moving ofRectangle which has float values for it’s position and dimension.
If the selection moves very slow i can see the 1 pixel steps creating a noticeable pop/jerk. This happens since the floats from position and dimensions get converted to integers.

When doing the same thing but using img.drawSubsection() i do not see this pixel stepping.
I guess because openGL allows for floats to set the position. Maybe even handles sub pixels?

My hope was to extract a texture from img.drawSubsection() load it in to ofPixels and then pass it on to my other openCV pixel manipulation functions.

Is there a way to get the subTexture directly, without needing to draw it first in to a FBO?
Or a way to use cropFrom with float values?

cvRemap from the below forum post was the solution to cropping with float accuracy.

here my quick example

1 Like