Info

This question is closed. Reopen it to edit or answer.

what is the matlab code for template not found?

1 view (last 30 days)
nitesh patil
nitesh patil on 27 Feb 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
i am doing iris based project, in that i am using template matching technique to find location(x,y) of center of match region. But my code showing match to which ever image i give, i want it to find match for iris region only, if other images other than eye part, it should tell template not found, how to construct code please help me, here is my present code
htm=vision.TemplateMatcher; hmi = vision.MarkerInserter('Size', 10, ... 'Fill', true, 'FillColor', 'White', 'Opacity', 0.75); I = imread('board.tif');
% Input image I = I(1:200,1:200,:);
% Use grayscale data for the search Igray = rgb2gray(I);
% Use a second similar chip as the template D=imread('my.jpg');T=rgb2gray(D);
% Find the [x y] coordinates of the chip's center Loc=step(htm,Igray,T);
% Mark the location on the image using white disc J = step(hmi, I, Loc);
imshow(T); title('Template'); figure; imshow(J); title('Marked target');

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!