Image Processing and Scaling- Enter base image, find pattern, compare to another image, and scale
2 次查看(过去 30 天)
显示 更早的评论
The attached image of an assembled tail panel with the lighthousing installed is what matlab should analyze. I'd like to compare an image of a tail light that I can measure in my hands to an image of a tail end of a car with the taillight installed. Matlab should find that portion of the image and then compare it with the width of the car (labeled A in one image) and then compare it with the bottom width between quarter panel flanges (B in one image). I can then compare those two dimensions to the car I have sitting on my shop floor.
Here's the sample image of a taillight housing that I would like matlab to detect in the image above (or from other images I select that are looking squarely at the rear end of a car with its bumper removed and tail light housing installed.
Here is my car and the two dimensions I want to scale on a factory car. I can screw the tail panel to it and put the light on if matlab will need that to compare images.
Here's a car with factory geometry and a tail light housing installed. This is the image matlab should search. It will look for the tail light. It will look for A and B, scale them, and output dimensions based off my car.
Yes, this scaling can be done with a ruler. I'm automating the process for learning purposes with MATLAB. How do I even begin to do this? I understand that the angle of the picture and different things will cause error and headache. I probably will keep the project scope very narrow and use only the third image to scale. Let's assume I have a picture of a tail light assembly sitting on a table. I want matlab to look for that image of a tail light housing in the image of the rear of the car and then scale.
回答(1 个)
Vidip
2024-1-22
编辑:Vidip
2024-1-22
Image Processing toolbox and Computer Vision toolbox could be used to achieve the image analysis and comparison, you'll need to follow several steps, the process can be broken down into the following main tasks:
- Image Preprocessing: Before analysing the images, they often need to be pre-processed to improve the results of subsequent operations. Common preprocessing steps include resizing, noise reduction, and colour space conversion. You can follow the below documentation link for the detailed steps - https://in.mathworks.com/help/images/getting-started-with-image-processing-toolbox.html
- Feature Detection and Matching: Detect and match features between the taillight housing image and the car rear image. Feature matching is essential for finding corresponding points between the two images.
1)Detect features: use ‘detectSURFFeatures’ or other feature detectors to find interest points.
2) Extract features: Extract feature descriptors around the interest points using ‘extractFeatures’.
3) Match features: Match these features between the two images using ‘matchFeatures’.
You can follow the below documentation links for detailed information –
- Geometric Transformation and Scaling: After matching features, you need to estimate the geometric transformation between the images. This will allow you to align and scale the images for comparison. To estimate geometric transformation, use ‘estimateGeometricTransform’ to find the transformation matrix that aligns the matched features and apply the transformation to the taillight image using ‘imwarp’ to align it with the car rear image.
You can follow the below documentation links for detailed information –
- Dimension Measurement: Measure the dimensions of interest in the image, considering the scaling factor from the transformation. To do the same you can follow the below documentation - https://in.mathworks.com/help/images/ref/imdistline.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Camera Calibration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!