Borrar filtros
Borrar filtros

how to find a sub image in an image and converting it to grayscale?

3 visualizaciones (últimos 30 días)
Kratos
Kratos el 9 de Abr. de 2015
Respondida: Image Analyst el 9 de Abr. de 2015
Hello,
I have an image and a sub image which is cropped out of the image.
(img, img_w)
val1 = imread(img);
val2 = imread(img_w);
gray1 = rgb2gray(val1);%grayscaling both images
gray2 = rgb2gray(val2);
matchingval = normxcorr2(gray1,gray2);%normalized cross correlation
[max_c,imax]=max(abs(matchingval (:)));
After this I am stuck. I have no Idea how to change the whole image grayscale except for the sub image which should be in color.
How do I do this?
Thank you.

Respuestas (1)

Image Analyst
Image Analyst el 9 de Abr. de 2015
This is exactly what I do in my attached demo, except that it's in color. Your situation might be a little simpler.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by