Process noisy image to get clean polygons - image

I am implementing image segmentation task and the output has a significant noise. I want to process the output image by removing all the noise and keep only the rectangle boxes (or polygons).
Can someone please suggest good image processing techniques for this?
For instance, the images which we need to process looks like following:
and the desired output should be something like following:

you should try these techniques probably it work on your problem.
4 Image Segmentation Techniques in OpenCV Python

Related

Tesseract-OCR (3.02) recognition accuracy and speed

I have group of very small images (w:70-100 ; h:12-20), like the one below:
In those images nothing but nickname of group's member. I want to read the text from simple images, they all have one background, only nickames are different. So, what I've done with that image:
I am using code below to get text from second image:
tesseract::TessBaseAPI ocr;
ocr.Init(NULL, "eng");
PIX* pix = pixRead("D:\\image.png");
ocr.SetImage(pix);
std::string result = ocr.GetUTF8Text();
I have 2 problems with that:
The ocr.GetUTF8Text(); is working slow: 650-750ms. Image is small, why it works so long anyway?
From the image above I am getting result like: "iwillkillsm", "iwillkillsel" etc. That image is simple, and I believe tesseract gurus are able to recognize it with 100% accuracy.
What should I do with image/code or what should I read (and where) about tesseract-ocr (something about text speed and quality recognition) to solve those problems?
It may sound odd, but I've always had the best luck with tesseract when I increased the dimensions of the image. The image would look "worse" to me but tesseract went faster and had much better accuracy.
There is a limit to how big you can make the images before you start getting worse results however :) I think I remember shooting for 600px in the past. You'll have to play with it though.

Problems with image convolution

I was given an assignment in which I have to write a function to convolve an image with a Gaussian filter (already calculated). I have done it but there is a slight difference between my output picture and my prof output. As you can see that the difference is at the top of his head (1st image is my output, second is from my prof), looks like I missed something? My output looks better but the server rejects it. Can anyone really point out all differences between 2 images so I can try to fix it.
This is my output
This is my prof's output
This is the original one

Background Subtraction with OpenCV 2

Is there any OpenCV 2.4.2 function or class that implements an Image Background Subtraction algorithm?
The images I will be processing will be portraits, such as images from a webcam. I want to keep only the upper part of the body (from the chest upwards) and remove everything else in the background.
If possible I'd like to avoid implementing these algorithms myself. However, should none currently exist in OpenCV then please suggest me some.
I tried to look for an answer but so far everything I've found only deals with Background Subtraction in videos or in sequences of pictures and that's not what I want. I want to process single, static and independent images only.
You can try the running average method for this using cvRunningAvg function in OpenCV (or any other library).
In this, you take average of a lot of frames as background. If camera is static, it provides a good result, especially if you have some frames with only background.
Look at a sample result :
It is also better to apply some morphological operations like erosion,dilation etc to remove small noises while frame grabbing.
You can read the code and explanation here : BackGround Extraction using Running Average

CLI : Is There A Script To Skew Image With A Curve

Looking for a script that will skew an image for me through the command line.
The skew needs be a curve; stead the angle skews offered by imagemagick or lunapic.
I want it to look like it is placed up in a celestial sphere.
Basically able to fit inside of these boxes.
Alsor, can CSS do it?
Thanks.
Got it using a program called POVRay and a little bit of script hacking... if interested, check it out the full explanation at linuxquestions.org: http://www.linuxquestions.org/questions/showthread.php?p=4764944

Creation of GLCM texture images using MATLAB

I am quite new to image processing and I have question concerning the use of a MATLAB function like a filter (graycoprops).
In the problem occurring is that I want to process the image using this function (graycoprops). To be able to do this I need first to create the GLCM (graycomatrix).
To do this for the whole image is easy but how can I do it for a small region (e.g. 3x3) like a filter.
I was thinking something like colfilt could work but I no idea how can I take each time the block values and feed them to the graycomatrix and graycoprops.
Any help would be much appreciated as I am many hours stack!!!
GLCM Code
You might be interested in the code I have on GitHub for GLCM with sliding windows. It'll allow a lot of customizations and you can manipulate the windows size.

Resources