View unanswered posts | View active topics It is currently Thu Aug 06, 2020 2:48 am



Reply to topic  [ 5 posts ] 
Modify the detection line script 
Author Message

Joined: Sat Jul 02, 2016 7:48 am
Posts: 3
It's posible to modify the detection line script to select only an specific color??
i need detected the white line in a road...

thanks,


Thu Jul 07, 2016 9:57 am
Profile

Joined: Wed Apr 27, 2016 2:26 pm
Posts: 6
Dear Max,
The script for line detection considers only geometry of the cloud, by extracting pieces of line. One way to improve it for road lines detection could be to filter the cloud before in order to deal only with white points.

It is possible to create this filter by script also:

Code:
// define  the color to keep 0,0,0 is black, 1,1,1 is white
var R=0.9;      // red
var G=0.9;      // green
var B=0.9;      // blue
var tol = 0.1;   // tolerance

var it = cloudToTreat.GetIterator();
var newCloud = SCloud.New();
   
if (it.IsValid())
{   
   var currentPt;
   var color;
    do
    {
        currentPt = it.GetPt();
       color = it.GetColor();
      if(      color.Red >=R-tol
         &&   color.Red <=R+tol
         &&   color.Green >=G-tol
         &&   color.Green <=G+tol
         &&   color.Blue >=B-tol
         &&   color.Blue <=B+tol)
      {
         newCloud.AddPoint(currentPt);
      }
   }
   while(it.GetNext())
}

_________________
Nicolas Mocellin - Product Line Manager, Geosystems Applications - 3DReshaper
nicolas.mocellin@hexagon.com


Tue Jul 12, 2016 3:20 pm
Profile

Joined: Sat Jul 02, 2016 7:48 am
Posts: 3
Thanks!

But i have some problems...
the script doesn't recognize the 7 step.

i don't know if i need to paste that in the line detection script.
or just to execute like a new script?


Wed Jul 13, 2016 3:46 pm
Profile

Joined: Wed Apr 27, 2016 2:26 pm
Posts: 6
Actually it is just sample of code to give an exemple about how to deal with colors and to filter clouds with them. It is not usable as is.
You will have to integrate it by yourself in the original line detection script (create a function to filter the whole cloud first, or integrate it in line computation, or...etc).

_________________
Nicolas Mocellin - Product Line Manager, Geosystems Applications - 3DReshaper
nicolas.mocellin@hexagon.com


Wed Jul 13, 2016 3:57 pm
Profile

Joined: Sat Jul 02, 2016 7:48 am
Posts: 3
Ok, thank you

i'll try to do it...


Thu Jul 14, 2016 10:33 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.