Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How I can compare one pixel to a neighbor pixel and also another pixel?

Asked by Teemu

Teemu (view profile)

on 14 Jan 2013

Also, how I can make a difference histogram of the comparison results? Or how I can make a difference histogram generally?

0 Comments

Teemu

Teemu (view profile)

1 Answer

Answer by Image Analyst

Image Analyst (view profile)

on 14 Jan 2013
Accepted answer

How do you want to compare them? Do you want to subtract them? If so you can use conv2(). Do you want to know how many times one gray level occurs next to another gray level? If so you can use graycomatrix().

13 Comments

Teemu

Teemu (view profile)

on 13 Feb 2013

How I can do it without conv2 function? Can I do it with loop? So I like to subtract pixel gray level to it´s neighbour pixel gray level using loop. How can I do it?

Image Analyst

Image Analyst (view profile)

on 13 Feb 2013

No comment.

Teemu

Teemu (view profile)

on 13 Feb 2013

ok. If you know the answer could you help me?

Image Analyst

Image Analyst (view profile)

Contact us