Open CV image quality issue - opencv

We are trying to process input image(attached-portion of image is masked becuase of sensitive data) using open cv 3.4.2-1 and getting output with full black colour. Please check attached output image . Please suggest how we can improve the quality to processed image to remove or corp the white space and get only that ID card portion of the image. Because after this,the image will be processed for OCR. Currently due to bad output image OCR failes completely.
Input image -maskes the portion of image
Output image

Related

Why does my PNG image look different in OpenCV?

The image is downloaded from a slide captcha and I'm trying to find the gap in this image with OpenCV.
But the gap is missing in the image opened with cv2.imshow() .
I am not familiar with PNG nor OpenCV so I'm so confused right now.
I searched a lot but found nothing useful maybe caused by using wrong keywords.
image opened with Windows Viewer:
image opened with cv2.imshow() :
I'm wondering why the same image in image viewer and OpenCV looks different and is there an easy way to locate the difference?

Have the inverse operation of ‘stereoRectify’ in OPENCV?

Firstly, 'stereorectify' have already done based on binocular vision, and then the image matching calculation is made with the corrected image. The matching points of the left and right images have been generated. Now it is necessary to restore the coordinates of the matching points to the coordinates before the image rectify. How can I do?
enter image description here
I have find "initInverseRectificationMap()"in OPENCV 4.5.3,enter link description here
And I make a test to compare the image after 'stereorectify' with the image after 'InverseRectification' enter image description here,the two images are not on the same horizontal line
In addition, I compare the image without 'stereorectify' with the image after 'InverseRectification'enter image description here,the two images are parallel on a horizontal line
so,"initInverseRectificationMap()" worked.
but it works on the image type,how it works on "Point2f"?

Issues with reading tif file in Octave

I am trying to read a medical imaging data which is in .tif format using Octave . It so happens that only software from https://fiji.sc/ has the ability to read the medical images I have. A sample of the image that I am referring is this one. This image is readable in.tif format only in fiji. The image can also be converted to jpg image. Only after data points is visible to other image editing software. Now the issue is , I want to load it into octave and read it - at the moment it is not possible. The imshow() function in octave is not allowing me to visualize the given .tif file.
So, if anybody has experience in reading such file formats please let me know. Thanks.
Your linked image is a 16bit grayscale image, see $ gm identify -verbose hello.tif. So lets load it into GNU Octave:
img = imread ("hello.tif");
hist (img(:), 200); # show histogram
Ah!, the main information of your image is in the range 0-600 (probably the image aquisition system used had 11 or 12bit resolution), so lets scale and print this part as color encoded (viridis) image:
imagesc (img, [0 600])
colorbar
Is this what you want? Of course we can also use a gray colormap, try: colormap gray
If this still doesn't fit your need you should really explain what you expect to see....
imread() relies on image magic to do the conversion, some versions of which can only read TIFF in 8-bit mode (giving a warning message), but when and how this happens I do not know.
It works for me using a .raw ṕicture converted to .tif in Fiji. I am specifically interested in several spectral analysis from my pictures which are taken illuminating with 660 and 850nm.

How to detect text area on image and save it to another image for preparing OCR in iOS?

I use GPUImage to convert image to Black&White, and then I use TesseractOCRiOS to scan text on that image, but output is not good result. So I want to detect text on image and save to another image with text only to prepare for OCR to have good result.

convert thumbnail image quality issue

I am using below ImageMagick convert thumbnail command to generate thumbnail from a high quality image, but the generated images is not clear as the original one and it is blurry and test are difficult to read.
Below is the command :-
convert -thumbnail 612x264 inputImage.gif outPutImage.gif;
Is there any quality for converet thumbnail which I am missing.
I am also attaching the input and output images link
Input Image:
Output Image:
Someone please help, thanks in advance!!!!!
Have you tried the quality parameter http://www.imagemagick.org/Usage/thumbnails/?

Resources