Info

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

Modifying images to get them clear

2 views (last 30 days)
thomas penner
thomas penner on 15 Jul 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi everyone,
I'm currently working on a project where I have to track a moving object (completly black object) hitting a black straight wall. The whole Background was white. I transformed the colour image to an greyscale image and then used the imbinarize function. It always worked until now.
Now I have a few videos where I have a shadow that partially covers the wall. That is a problem because I need to see the object hitting that clear wall. I'll attach a pic of what it looks like and of what I want it to be.
I also got a problem when imbinarizing that image, because sometimes the wall is way too exposed to the light ( the wall reflects a lot of light and becomes grey/white ).
I've already used a few functions like imadjust and tried to use the different settings of imbinarize but it didn't get any better...
In easier words I want the Projectile and the Wall to have clear outlines.
Has anyone an idea how I could work this out ?
Thanks in advance for any response.

Answers (1)

Parth Dethaliya
Parth Dethaliya on 15 Jul 2020
If you are using imbinarize function in default condition then this problem may occur, Try changing the threshold values for binarizing.
Threshold = graythresh(GrayImage);
This function gives the default threshold values ranging from 0 to 1, try increasing this value and binarize image like,
Binary_Image = imbinarize(GrayImage,Threshold+0.01);
you can change the number 0.01 iteratively to find better results depending on your application.

This question is closed.

Community Treasure Hunt

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

Start Hunting!