Thread Subject: hello

Subject: hello

From: liong

Date: 21 Oct, 2009 14:25:23

Message: 1 of 2

i am doing the project on eye detection by using template matching by finding the similarity value between the sample and image.


for i= 1: 120;
    for j= 1:120;
        (i,j)= bw2(i,j)- t(i,j) #
    end
      end

A= 1- (sum(sum(n))/(120*120*255*3));

where t is template and bw2 is sample and A is the similarity function between the template and sample. But the error is happen at the row #...can anyone tell me about this? please...i need your help. and i will appreaciate it..

Subject: hello

From: Gavrilo Bozovic

Date: 21 Oct, 2009 14:47:04

Message: 2 of 2

"liong " <khliong_1986@yahoo.com> wrote in message <hbn5ki$7t$1@fred.mathworks.com>...
> i am doing the project on eye detection by using template matching by finding the similarity value between the sample and image.
>
>
> for i= 1: 120;
> for j= 1:120;
> (i,j)= bw2(i,j)- t(i,j) #
> end
> end
>
> A= 1- (sum(sum(n))/(120*120*255*3));
>
> where t is template and bw2 is sample and A is the similarity function between the template and sample. But the error is happen at the row #...can anyone tell me about this? please...i need your help. and i will appreaciate it..

1. use more explicit subjects for your posts
2. the line (i,j)= bw2(i,j)- t(i,j) cannot work. (i,j) is an indexing, it has to be applied to a matrix, like AA(i,j) = bw2(i,j)- t(i,j)
3. all your for loop does basically AA=bw-t --> DO NOT USE A FOR LOOP!
4. I'm not exactly sure I understood what you're trying to do. However, what you ARE doing is just substracting a matrix from another one.

If I guess correctly, you are trying to find in which location the image bw2 has the highest correlation with the image t? in this case, you have to substract the local subset of the image bw to the reference image t.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com