Connect component of specific mask with a certain shape and distance

asked 2019-12-01 09:33:46 -0500

Hello to everyone, first of all thank you in advance for all of your answer.

I'm working on a project that giving an image in input i have to create a mask of a certain class of pixels. After an elaboration on the bands, i got this:

image description

This one is the image masked:

image description

Considering that every image I have to process generates a mask that has a lines shape like this (horizontal, oblique or vertical) i'm looking for a fast way that can connect the pixel of the mask that are along the same line, sufficiently close and that have similar numerical properties (referred to the RGB bands and the NIR band) known to me.

Any ideas ?

edit retag flag offensive close merge delete

Comments

1

take a look at https://answers.opencv.org/question/1... maybe you will find a way to use it to solve your problem

sturkmen gravatar imagesturkmen ( 2019-12-01 13:28:51 -0500 )edit

@Frdtsyer. Can you post orignal image?

supra56 gravatar imagesupra56 ( 2019-12-01 20:15:27 -0500 )edit

@sturkmen thank you, but it's work only for vertical lines and does not take into account that the similarity of digital numbers of the pixels. @Supra the image is like an orthophoto, i have to recognize the vines stripes in it

Frdtsyer gravatar imageFrdtsyer ( 2019-12-02 01:53:52 -0500 )edit