MATLAB: How to give output name of image matched from template matching image processing method

image processingtemplate matching

hi, i have a code that will take the query image from webcam and will do some template matching process with image templates in database. after doing the template matching, i want the program to show the name of the template image matched from the database. how am i going to do that?

Best Answer

Create a if- statememt.
file = 'H:\user4\matlab\myfile.txt'; % example file
[filepath,name,ext] = fileparts(file)
If(condition to fullfill your if, like "ObjectFound == 1")
fprintf = ('file name is %s',name) % this will display the text in the command window.
end