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.
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?
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With