MATLAB: Localization defect real coordinate

Computer Vision Toolboximage processingImage Processing Toolboxspatial calibrationthermal

Ive been doing some reseach on localizing defect and actually to provide information about the real coordianate of the defect such as in x and y axis or meters. im detecting red colour, filter it and i segmentized it. But i couldnt find the algorithm to locate the actual location of the defect in the thermal image.

Best Answer

What do you mean by "actual location"? Do you want a list of all the (row, column) coordinates of all the pixels in your blob? Or just the centroid? See my Image Segmentation Tutorial in my File Exchange
Do you want in real world units, like meters? See attached spatial calibration demo.
Do you need to calibrate for non-planar scenes? If so see https://www.mathworks.com/products/computer-vision.html#camera-calibration