Estimating an image deblurring/denoising technique - matlab

I'm new to image processing and wanted to deblur/denoise some images using Matlab. Example:
Input
Output
I don't know the exact blurring/noising effects by which the second image came about. At first, I normally did so by trial and error of the Wiener deconvolution method, but not able to reach best results.
So my question is, is there a more clever method other than trial and error?
(Note: The output image was obtained from Robot36 radio transmission decoder.)

I'd suggest trying the Richardson-Lucy deblurring algorithm. It is available as a built-in function in the Image Processing Toolbox. It makes use of multiple iterations which you can set to control the degree to which you want the image deblurred. I've always found this a very useful method. Here's the doc link: deconvlucy

Related

Matlab Image Histogram Analysis: how do I test for an underlying bimodal distribution?

I am working with image processing in MATLAB. I have two different images whose histogram plots are as shown below.
Image 1:
and
Image 2:
I have multiple images like those and the only distinguishing(separating) features is that some have single peak and others have two peaks.
In other words some can be thresholded (to generate good results) while others cannot. Is there any way I can separate the two images? Are there any functions that do so in MATLAB or any reference code that will help?
The function used is imhist()
If you mean "distinguish" by "separate", then yes: The property you describe is called bimodality, i.e. you have 2 peaks that can be seperated by one threshold. So your question is actually "how do I test for an underlying bimodal distribution?"
One option to do this programmatically is Binning. This is not the most robust method but the easiest. It might work, it might not.
Kernel Smoothing is probably the more robust solution. You basically shift and scale a certain function (e.g. Gaussian) to fit the data. This can be done with histfit in matlab.
There's more solutions for this problem which you can research for yourself since you now know the terms needed. Be aware though that your problem is not a trivial one if you want to do it properly.

Multiscale search for HOG+SVM in Matlab

first of all this is my first question here, so I hope I can explain it in a clear way.
My goal is to detect different classes of traffic signs in images. For that purpose I have trained binary SVMs following these steps:
First I got a database of cropped traffic signs like the one in the link. I considered different classes (prohibition, danger, etc), and negative images. All of them were scaled to 40x40 pixels.
http://i.imgur.com/Hm9YyZT.jpg
I trained linear-SVM models for each class (1-vs-all), using HOG as feature. Each image is described with a 1728-dimensional feature. (I append the three feature vectors for all three image planes). I did crossvalidation to set parameter C, and tested on previously unseen 40x40 images, and I got very accurate results (F1 score over 0.9 for all classes). I used libsvm for training and testing.
Now I'd want to detect signs in full road images, sliding a window in different image scales. The problem I'm facing is that I couldn't find any function that can do it for me (as DetectMultiScale in OpenCV), and my solution is very slow and rudimentary (I'm just doing a triple for loop, and for each scale I crop consecutive and overlapping 40x40 images, obtain HOG features and apply svmpredict for each one).
Can someone give me a clue to find a faster way to do it? I thought too about getting the HOG feature vector of the whole input image, and then reorder that vector to a matrix where each row will have the features corresponding to each 40x40 window, but I couldn't find a straightforward way of doing it.
Thanks,
I would suggest using SURF feature detection, however I don't know if this would also be too slow your needs.
See : http://morf.lv/modules.php?name=tutorials&lasit=2 for more information on how to implement and weather it is a viable solution for you.

T test in image segmentation

how to use T test in image processing? i am working on image segmentation using split and merge algorithm using Matlab. to merge adjacent regions i need to t test to compare mean..
You probably need an F-test if you need to check if several samples have the same mean. The formulas you need to use depend on assumptions about your data, check http://en.wikipedia.org/wiki/F-test article. The F distribution can be calculated in Matlab using fcdf.

MATLAB Optical character recognition - need help

I have to use mat lab to find a certain letter in a tif text image.In the spatial domain. I have no idea how to do this, and can't find any documentation other than complex code that uses loops, loops are forbidden. Yes, this is an assignment I don't want the answer just some direction on how to even start.
I want to use imfilter and use a letter as a template or filter to imfilter using correlation but from there I have no idea where to go and don't even know what questions to ask to find more info on mat labs site.
The write up makes it seem simple but I know nothing of this subject as I am a beginner so to me this is hard.
thanks
If you have the image processing toolbox I would suggest using the function normxcorr2. It calculates the normalized cross correlation between a template image and a larger image, which I think is what you want.
You don't need any for loops to use it, but the method itself probably uses for loops somewhere hidden in the code. I don't know if that counts..

How can I analyze morphological features of image regions in MATLAB?

I have to spread rice grains on a sheet and then find the average length of the rice grains spread. Any ideas how to do this in MATLAB?
If you have a good contrast between the background and the rice, you can follow a simple (though naive algorithm) recipe (I don't remember the commands in Matlab but it will be easy using the help)
1 - Threshold
2- Component Labeling
3- Get the length of each component (as pointed by #second) and use it to reckon the average size.
This exact situation can be found as an image processing example in the online MathWorks documentation for the Image Processing Toolbox:
Example 2 — Analyzing Images
Seriously, they use a picture of rice grains and everything! The only difference would be that you would want to look at a different property of the image when using the function REGIONPROPS, probably the 'MajorAxisLength' property (which requires using the labeled matrix from the example).
sounds like homework but here are some ideas
look at regionprops in the image processing toolbox.
there are a bunch of properties it can help you find, 'majoraxislength' may be apropriate.