简体   繁体   中英

Digital image processing with MATLAB using 3 techniques

I have a homework in MATLAB. I must use 3 image processing techniques. So I should make a task and then solve it using 3 techniques(for example, thresholding, segmentation, morphology, restoration, histogram equalization, noise remove...). I need some idea and how to solve it, will you help me? :)

Thank you.

  • In edition:

I have found this in some book....Do you have any idea? Is it possible to restore picture a to picture i ?

Note : Some solution is indicated below.But to tell the truth I didn't understand :( Can you explain it to me?

解??

You could for example try to isolate an object by three different methods.

Let's do this in Mathematica. (MATLAB is your homework).

Let's call our image i :

i = 在此输入图像描述

And let's try to isolate a mask called mask :

mask = 在此输入图像描述

See the example codes:

(* First Method, by Image Correlation*)
x = ImageCorrelate[ i, mask, EuclideanDistance];
r = Position[ImageData@Binarize[x, 0.2], 0, Infinity];
(*Show that we found the right spot *)
ImageCompose[i, 
 ColorNegate@
  mask, {0, Dimensions[ImageData[i]][[1]]} - {-1, 1} Reverse[r[[1]]]]

Result:

在此输入图像描述

(* Second method, separating channels, 
   thresholding and deleting small components*)

r = DeleteSmallComponents@Binarize[#, .99] &@
   ColorNegate[ColorSeparate[i][[3]]];
ImageMultiply[i, r]

Result:

在此输入图像描述

(* Third method, extracting the exact color *)
Image[ImageData[i] /. {1., 0.6, 0.} -> {a} /. {_, _, _} -> {0, 0,0} /. 
                                       {a} -> {1., 0.6, 0.}]  

Result:

在此输入图像描述

HTH!

I am giving a try to the images you posted in the edit. The results are not perfect, but this is an approximation. Finding the right filters may take a while.

First applying a Laplacian filter to remove noise, you get:

TotalVariationFilter[image, 1, Method -> "Laplacian"]  

在此输入图像描述

And then you have to deconvolve the diagonal motion blur. You need a kernel like this one :

在此输入图像描述

Which, when applied to the de-noised image gives:

ImageDeconvolve[denoisedImage, kernel, Method -> "RichardsonLucy", 
 MaxIterations -> 15]

在此输入图像描述

The image is not perfect, but I hope this gives you an idea of what can be done.

Restoration of this picture is very difficult... So I decided to change the task.

The task and solution are discussed here:

http://geogeeks.net/2011/03/18/digital-image-processing-using-matlab/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM