How to remove the pole from the NIR image

 Accepted Answer

Since it's in a known location, simple create a binary image as a template/mask and mask it out
irImage(mask) = 0;

8 Comments

Thanks image analyst. Is there any way to extract the plant by using only one mask as you mentioned above to remove the background, pole and pot in one go?
Assuming the camera position is fixed, the pole will remain fixed and thus you can simply mask it out. However if the plant goes in front of it, you'll have to not mask it out. You can't mask out the plant and pole in one mask since they seem to be about the same gray level.
irImage(mask) = 0;
In this step i am losing some of the plant portion. Is there any method like texture based segmentation to extract only the green plants?
Also in some images, the pole is not completely removed. some of the plant pixels are matched with the pole pixels
Yep. Just what I said. The best option is to paint the pole white or change the material so it doesn't reflect the same amount of energy as the plants. Or perhaps you could combine it with an RGB image where you could somehow use color segmentation to get non-green things.
Malini's "Answer" moved from being an Answer to here since it's really a comment to me rather than an answer to her original question at the top:
"From this gray image,how to segment non green pixels..."
You don't. You need to also capture an RGB image from the same viewpoint. So two images from cameras mounted side by side. Or, cheaper, simply paint the pole white or use a pole of a different material.
I already have an RGB image. Will try to change the pole color

Sign in to comment.

More Answers (1)

Malini
Malini on 12 Jul 2018
From this gray image,how to segment non green pixels...

3 Comments

This is not an answer to the original question. Did you mean for it to be a comment somewhere else?
This is about the color segmentation , you mentioned
Alright, I'll move it for you to where it should have been posted.

Sign in to comment.

Categories

Find more on Fluid Dynamics in Help Center and File Exchange

Asked:

on 10 Jul 2018

Commented:

on 13 Jul 2018

Community Treasure Hunt

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

Start Hunting!