How to get the non-integer coordinate pixels.

asked 2017-06-12 05:45:35 -0500

Priya KUMARI gravatar image

updated 2017-06-12 06:03:02 -0500

Hallo Everyone,

I am very beginner to OpenCv as well as coding. I am using affine transformation to get the warped image and I am trying to implement the bilinear Interpolation function to remove distortion after image transformation. I have Idea on implementing the algorithm, but I do not know how to get the location of newly created pixels (non-integer coordinate pixels) or subpixels . Is there any function in opencv that detects this kind of pixels and give us location or any method that you could suggest.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Everything is in Doc Point, Point2f Point2d....

About interpolation doc is here and there is already a flag for interpoltion method

LBerger gravatar imageLBerger ( 2017-06-12 06:22:53 -0500 )edit

@LBerger. Thank you for the reply. My project is to implement the own function for the Interpolation. Could you explain me the functionality of the " getRectSubPix ". what it gives. And Can you tell me the basic formula we use from the Bilinear interpolation gives the same accuracy as the flag in Opencv??..

Priya KUMARI gravatar imagePriya KUMARI ( 2017-06-12 08:40:29 -0500 )edit

getrectsubpix it 's here

" Bilinear interpolation gives the same accuracy as the flag in Opencv" may be you can write a program to test it yourself...

LBerger gravatar imageLBerger ( 2017-06-12 08:55:17 -0500 )edit

@LBerger. Okay I already have read the description from that manual, but i do not really understand the purpose of that function. Is it used to get the value of non integer coordinates. Do you have any example to explain it bit easily.

Priya KUMARI gravatar imagePriya KUMARI ( 2017-06-12 09:23:44 -0500 )edit

i think, you're chasing some mystical beast here. there are no flating point coords after the warping is applied, you would have to re-invent the whole warping process to get there, which is definitely a bad idea.

berak gravatar imageberak ( 2017-06-13 23:52:44 -0500 )edit