How to Change image intensity range [closed]
Hi,
I am working with image registration. I have gray-scale images (CV_8UC1). I have done the registration part. Now I want to check the alignment accuracy. I want to convert the intensity range to [-127 to 128] from [0 to 255]. How can I do that? What I am doing is:
- subtract the aligned image from template
- divide the result by 2
- add 128 to result
Is this correct? Do I need to convert the images from 8U ?
Thanks
"Do I need to convert the images from 8U" -- definitely !
Hi berak,
In the code example shown here in the showDifference function images are being converted to 32F. Should that be the approach?I want to check two things: missing object and extra object in the aligned image.
yes, that example looks perfect to me.
(well, you only need to convert to CV_32FC1 only for your grayscale images, and skip the grayscale conversion there)
"I want to check two things: missing object and extra object in the aligned image" -- you might want to explain this a bit deeper (if you need further help on that)
Thanks,
Ok so I am working with printed images. I have a set of images and I am checking the cover side of each image. The first image is the template image. the rest are checked against the template. For each subsequent image there is some distortion / motion present. So I am doing the registration. I am experimenting with estimateRigidTransform() and fidTransformECC to see alignment performance. I need to check if there is missing print and/or extra print comparing the aligned image against the template.