Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

Solution??

like image 482
kupa Avatar asked Mar 14 '11 17:03

kupa


1 Answers

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 = enter image description here

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

mask = enter image description here

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:

enter image description here

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

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

Result:

enter image description here

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

Result:

enter image description here

HTH!

like image 75
Dr. belisarius Avatar answered Oct 06 '22 18:10

Dr. belisarius