![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|

Go to the source code of this file.
Functions | |
| double * | LineSegmentDetection (int *n_out, double *img, int X, int Y, double scale, double sigma_scale, double quant, double ang_th, double log_eps, double density_th, int n_bins, int **reg_img, int *reg_x, int *reg_y) |
| double * | lsd_scale_region (int *n_out, double *img, int X, int Y, double scale, int **reg_img, int *reg_x, int *reg_y) |
| double * | lsd_scale (int *n_out, double *img, int X, int Y, double scale) |
| double * | lsd (int *n_out, double *img, int X, int Y) |
LSD module header
Definition in file lsd.h.
| double* LineSegmentDetection | ( | int * | n_out, |
| double * | img, | ||
| int | X, | ||
| int | Y, | ||
| double | scale, | ||
| double | sigma_scale, | ||
| double | quant, | ||
| double | ang_th, | ||
| double | log_eps, | ||
| double | density_th, | ||
| int | n_bins, | ||
| int ** | reg_img, | ||
| int * | reg_x, | ||
| int * | reg_y | ||
| ) |
LSD Full Interface
| n_out | Pointer to an int where LSD will store the number of line segments detected. |
| img | Pointer to input image data. It must be an array of doubles of size X x Y, and the pixel at coordinates (x,y) is obtained by img[x+y*X]. |
| X | X size of the image: the number of columns. |
| Y | Y size of the image: the number of rows. |
| scale | When different from 1.0, LSD will scale the input image by 'scale' factor by Gaussian filtering, before detecting line segments. Example: if scale=0.8, the input image will be subsampled to 80% of its size, before the line segment detector is applied. Suggested value: 0.8 |
| sigma_scale | When scale!=1.0, the sigma of the Gaussian filter is: sigma = sigma_scale / scale, if scale < 1.0 sigma = sigma_scale, if scale >= 1.0 Suggested value: 0.6 |
| quant | Bound to the quantization error on the gradient norm. Example: if gray levels are quantized to integer steps, the gradient (computed by finite differences) error due to quantization will be bounded by 2.0, as the worst case is when the error are 1 and -1, that gives an error of 2.0. Suggested value: 2.0 |
| ang_th | Gradient angle tolerance in the region growing algorithm, in degrees. Suggested value: 22.5 |
| log_eps | Detection threshold, accept if -log10(NFA) > log_eps. The larger the value, the more strict the detector is, and will result in less detections. (Note that the 'minus sign' makes that this behavior is opposite to the one of NFA.) The value -log10(NFA) is equivalent but more intuitive than NFA:
|
Suggested value: 0.0
| density_th | Minimal proportion of 'supporting' points in a rectangle. Suggested value: 0.7 |
| n_bins | Number of bins used in the pseudo-ordering of gradient modulus. Suggested value: 1024 |
| reg_img | Optional output: if desired, LSD will return an int image where each pixel indicates the line segment to which it belongs. Unused pixels have the value '0', while the used ones have the number of the line segment, numbered 1,2,3,..., in the same order as in the output list. If desired, a non NULL int** pointer must be assigned, and LSD will make that the pointer point to an int array of size reg_x x reg_y, where the pixel value at (x,y) is obtained with (*reg_img)[x+y*reg_x]. Note that the resulting image has the size of the image used for the processing, that is, the size of the input image scaled by the given factor 'scale'. If scale!=1 this size differs from XxY and that is the reason why its value is given by reg_x and reg_y. Suggested value: NULL |
| reg_x | Pointer to an int where LSD will put the X size 'reg_img' image, when asked for. Suggested value: NULL |
| reg_y | Pointer to an int where LSD will put the Y size 'reg_img' image, when asked for. Suggested value: NULL |
for a line segment from coordinates (x1,y1) to (x2,y2), a width 'width', an angle precision of p in (0,1) given by angle_tolerance/180 degree, and NFA value 'NFA'. If 'out' is the returned pointer, the 7 values of line segment number 'n+1' are obtained with 'out[7*n+0]' to 'out[7*n+6]'.
LSD full interface.
Definition at line 2025 of file lsd.c.
References image.
Referenced by lsd_scale_region().
| double* lsd | ( | int * | n_out, |
| double * | img, | ||
| int | X, | ||
| int | Y | ||
| ) |
LSD Simple Interface
| n_out | Pointer to an int where LSD will store the number of line segments detected. |
| img | Pointer to input image data. It must be an array of doubles of size X x Y, and the pixel at coordinates (x,y) is obtained by img[x+y*X]. |
| X | X size of the image: the number of columns. |
| Y | Y size of the image: the number of rows. |
for a line segment from coordinates (x1,y1) to (x2,y2), a width 'width', an angle precision of p in (0,1) given by angle_tolerance/180 degree, and NFA value 'NFA'. If 'out' is the returned pointer, the 7 values of line segment number 'n+1' are obtained with 'out[7*n+0]' to 'out[7*n+6]'.
LSD Simple Interface.
Definition at line 2243 of file lsd.c.
References lsd_scale(), and X.
| double* lsd_scale | ( | int * | n_out, |
| double * | img, | ||
| int | X, | ||
| int | Y, | ||
| double | scale | ||
| ) |
LSD Simple Interface with Scale
| n_out | Pointer to an int where LSD will store the number of line segments detected. |
| img | Pointer to input image data. It must be an array of doubles of size X x Y, and the pixel at coordinates (x,y) is obtained by img[x+y*X]. |
| X | X size of the image: the number of columns. |
| Y | Y size of the image: the number of rows. |
| scale | When different from 1.0, LSD will scale the input image by 'scale' factor by Gaussian filtering, before detecting line segments. Example: if scale=0.8, the input image will be subsampled to 80% of its size, before the line segment detector is applied. Suggested value: 0.8 |
for a line segment from coordinates (x1,y1) to (x2,y2), a width 'width', an angle precision of p in (0,1) given by angle_tolerance/180 degree, and NFA value 'NFA'. If 'out' is the returned pointer, the 7 values of line segment number 'n+1' are obtained with 'out[7*n+0]' to 'out[7*n+6]'.
LSD Simple Interface with Scale.
Definition at line 2235 of file lsd.c.
References lsd_scale_region(), NULL, and X.
Referenced by lsd().
| double* lsd_scale_region | ( | int * | n_out, |
| double * | img, | ||
| int | X, | ||
| int | Y, | ||
| double | scale, | ||
| int ** | reg_img, | ||
| int * | reg_x, | ||
| int * | reg_y | ||
| ) |
LSD Simple Interface with Scale and Region output.
| n_out | Pointer to an int where LSD will store the number of line segments detected. |
| img | Pointer to input image data. It must be an array of doubles of size X x Y, and the pixel at coordinates (x,y) is obtained by img[x+y*X]. |
| X | X size of the image: the number of columns. |
| Y | Y size of the image: the number of rows. |
| scale | When different from 1.0, LSD will scale the input image by 'scale' factor by Gaussian filtering, before detecting line segments. Example: if scale=0.8, the input image will be subsampled to 80% of its size, before the line segment detector is applied. Suggested value: 0.8 |
| reg_img | Optional output: if desired, LSD will return an int image where each pixel indicates the line segment to which it belongs. Unused pixels have the value '0', while the used ones have the number of the line segment, numbered 1,2,3,..., in the same order as in the output list. If desired, a non NULL int** pointer must be assigned, and LSD will make that the pointer point to an int array of size reg_x x reg_y, where the pixel value at (x,y) is obtained with (*reg_img)[x+y*reg_x]. Note that the resulting image has the size of the image used for the processing, that is, the size of the input image scaled by the given factor 'scale'. If scale!=1 this size differs from XxY and that is the reason why its value is given by reg_x and reg_y. Suggested value: NULL |
| reg_x | Pointer to an int where LSD will put the X size 'reg_img' image, when asked for. Suggested value: NULL |
| reg_y | Pointer to an int where LSD will put the Y size 'reg_img' image, when asked for. Suggested value: NULL |
for a line segment from coordinates (x1,y1) to (x2,y2), a width 'width', an angle precision of p in (0,1) given by angle_tolerance/180 degree, and NFA value 'NFA'. If 'out' is the returned pointer, the 7 values of line segment number 'n+1' are obtained with 'out[7*n+0]' to 'out[7*n+6]'.
LSD Simple Interface with Scale and Region output.
Definition at line 2212 of file lsd.c.
References LineSegmentDetection(), G3Point::quant(), and X.
Referenced by lsd_scale().