Documentation Portal      

What are you looking for?

Profile Sampling

Functional Guide | Reference: ImageToLineSegment, LineSegmentToImage

//////////////////////////////////////////////////////////////
// This code snippet shows how to set, retrieve and store //
// the pixel values along a given line segment. //
//////////////////////////////////////////////////////////////
// Image constructor
EImageBW8 srcImage;
// ...
// Vector constructor
EBW8Vector profile;
// Get the image data along segment (10,510)-(500,40)
EasyImage::ImageToLineSegment(&srcImage, &profile, 10, 510, 500, 40);
// Set all these points to white (255) in the image
EasyImage::LineSegmentToImage(&srcImage, 255, 10, 510, 500, 40);
'//////////////////////////////////////////////////////////////
'// This code snippet shows how to set, retrieve and store //
'// the pixel values along a given line segment. //
'//////////////////////////////////////////////////////////////
' EasyImage context constructor
Dim EasyImage As New EasyImage
' Image constructor
Dim srcImage As New EImageBW8
' ...
' Vector constructor
Dim profile As New EBW8Vector
' Get the image data along segment (10,512)-(500,40)
EasyImage.ImageToLineSegmentBW8 srcImage, profile, 10, 512, 500, 40
' Set all these points to white (255) in the image
Dim white As EBW8
white.value = 255
EasyImage.LineSegmentToImage srcImage, white, 10, 512, 500, 40
//////////////////////////////////////////////////////////////
// This code snippet shows how to set, retrieve and store //
// the pixel values along a given line segment. //
//////////////////////////////////////////////////////////////
// Image constructor
EImageBW8 srcImage= new EImageBW8();
// ...
// Vector constructor
EBW8Vector profile= new EBW8Vector();
// Get the image data along segment (10,512)-(500,40)
EasyImage.ImageToLineSegment(srcImage, profile, 10, 512, 500, 40);
// Set all these points to white (255) in the image
EBW8 white = new EBW8(255);
EasyImage.LineSegmentToImage(srcImage, white, 10, 512, 500, 40);

See also in the Reference

ImageToLineSegment

LineSegmentToImage

Which API shall we display?

© 2018 EURESYS s.a.  -  About Documentation  -  Open Source Licenses  -  Open eVision 2.6.1.1110