![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <stdio.h>#include <stdlib.h>#include <math.h>#include <limits.h>#include <float.h>#include "lsd.h"
Go to the source code of this file.
Classes | |
| struct | coorlist |
| struct | point |
| struct | ntuple_list_s |
| struct | image_char_s |
| struct | image_int_s |
| struct | image_double_s |
| struct | rect |
| struct | rect_iter |
Macros | |
| #define | M_LN10 2.30258509299404568402 |
| #define | M_PI 3.14159265358979323846 |
| #define | FALSE 0 |
| #define | TRUE 1 |
| #define | NOTDEF -1024.0 |
| #define | M_3_2_PI 4.71238898038 |
| #define | M_2__PI 6.28318530718 |
| #define | NOTUSED 0 |
| #define | USED 1 |
| #define | RELATIVE_ERROR_FACTOR 100.0 |
| #define | log_gamma(x) ((x)>15.0?log_gamma_windschitl(x):log_gamma_lanczos(x)) |
| #define | TABSIZE 100000 |
Typedefs | |
| typedef struct ntuple_list_s * | ntuple_list |
| typedef struct image_char_s * | image_char |
| typedef struct image_int_s * | image_int |
| typedef struct image_double_s * | image_double |
Functions | |
| static void | error (char *msg) |
| static int | double_equal (double a, double b) |
| static double | dist (double x1, double y1, double x2, double y2) |
| static void | free_ntuple_list (ntuple_list in) |
| static ntuple_list | new_ntuple_list (unsigned int dim) |
| static void | enlarge_ntuple_list (ntuple_list n_tuple) |
| static void | add_7tuple (ntuple_list out, double v1, double v2, double v3, double v4, double v5, double v6, double v7) |
| static void | free_image_char (image_char i) |
| static image_char | new_image_char (unsigned int xsize, unsigned int ysize) |
| static image_char | new_image_char_ini (unsigned int xsize, unsigned int ysize, unsigned char fill_value) |
| static image_int | new_image_int (unsigned int xsize, unsigned int ysize) |
| static image_int | new_image_int_ini (unsigned int xsize, unsigned int ysize, int fill_value) |
| static void | free_image_double (image_double i) |
| static image_double | new_image_double (unsigned int xsize, unsigned int ysize) |
| static image_double | new_image_double_ptr (unsigned int xsize, unsigned int ysize, double *data) |
| static void | gaussian_kernel (ntuple_list kernel, double sigma, double mean) |
| static image_double | gaussian_sampler (image_double in, double scale, double sigma_scale) |
| static image_double | ll_angle (image_double in, double threshold, struct coorlist **list_p, void **mem_p, image_double *modgrad, unsigned int n_bins) |
| static int | isaligned (int x, int y, image_double angles, double theta, double prec) |
| static double | angle_diff (double a, double b) |
| static double | angle_diff_signed (double a, double b) |
| static double | log_gamma_lanczos (double x) |
| static double | log_gamma_windschitl (double x) |
| static double | nfa (int n, int k, double p, double logNT) |
| static void | rect_copy (struct rect *in, struct rect *out) |
| static double | inter_low (double x, double x1, double y1, double x2, double y2) |
| static double | inter_hi (double x, double x1, double y1, double x2, double y2) |
| static void | ri_del (rect_iter *iter) |
| static int | ri_end (rect_iter *i) |
| static void | ri_inc (rect_iter *i) |
| static rect_iter * | ri_ini (struct rect *r) |
| static double | rect_nfa (struct rect *rec, image_double angles, double logNT) |
| static double | get_theta (struct point *reg, int reg_size, double x, double y, image_double modgrad, double reg_angle, double prec) |
| static void | region2rect (struct point *reg, int reg_size, image_double modgrad, double reg_angle, double prec, double p, struct rect *rec) |
| static void | region_grow (int x, int y, image_double angles, struct point *reg, int *reg_size, double *reg_angle, image_char used, double prec) |
| static double | rect_improve (struct rect *rec, image_double angles, double logNT, double log_eps) |
| static int | reduce_region_radius (struct point *reg, int *reg_size, image_double modgrad, double reg_angle, double prec, double p, struct rect *rec, image_char used, image_double angles, double density_th) |
| static int | refine (struct point *reg, int *reg_size, image_double modgrad, double reg_angle, double prec, double p, struct rect *rec, image_char used, image_double angles, double density_th) |
| 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 code
Definition in file lsd.c.
| #define log_gamma | ( | x | ) | ((x)>15.0?log_gamma_windschitl(x):log_gamma_lanczos(x)) |
Computes the natural logarithm of the absolute value of the gamma function of x. When x>15 use log_gamma_windschitl(), otherwise use log_gamma_lanczos().
| #define NOTDEF -1024.0 |
| #define RELATIVE_ERROR_FACTOR 100.0 |
| #define TABSIZE 100000 |
| typedef struct image_char_s * image_char |
char image data type
The pixel value at (x,y) is accessed by:
image->data[ x + y * image->xsize ]
with x and y integer.
| typedef struct image_double_s * image_double |
double image data type
The pixel value at (x,y) is accessed by:
image->data[ x + y * image->xsize ]
with x and y integer.
| typedef struct image_int_s * image_int |
int image data type
The pixel value at (x,y) is accessed by:
image->data[ x + y * image->xsize ]
with x and y integer.
| typedef struct ntuple_list_s * ntuple_list |
'list of n-tuple' data type
The i-th component of the j-th n-tuple of an n-tuple list 'ntl' is accessed with:
ntl->values[ i + j * ntl->dim ]
The dimension of the n-tuple (n) is:
ntl->dim
The number of n-tuples in the list is:
ntl->size
The maximum number of n-tuples that can be stored in the list with the allocated memory at a given time is given by:
ntl->max_size
|
static |
|
static |
|
static |
|
static |
Computes Euclidean distance between point (x1,y1) and point (x2,y2).
Definition at line 207 of file lsd.c.
Referenced by flann::HellingerDistance< T >::accum_dist(), qCanupo2DViewDialog::addOrSelectPoint(), flann::KNNSimpleResultSet< DistanceType >::addPoint(), flann::KNNResultSet< DistanceType >::addPoint(), flann::KNNResultSet2< DistanceType >::addPoint(), flann::RadiusResultSet< DistanceType >::addPoint(), flann::KNNRadiusResultSet< DistanceType >::addPoint(), flann::CountRadiusResultSet< DistanceType >::addPoint(), flann::KNNUniqueResultSet< DistanceType >::addPoint(), flann::RadiusUniqueResultSet< DistanceType >::addPoint(), flann::KMeansIndex< Distance >::addPoints(), allocateBtreePage(), cloudViewer::visualization::rendering::MatrixInteractorLogic::CalcDollyDist(), cloudViewer::visualization::rendering::RotationInteractorLogic::CalcPanVectorWorld(), ccPointPairRegistrationDlg::callHornRegistration(), ccAlignDlg::changeSamplingMethod(), cloudViewer::KDTree::checkDistantPointInSubTree(), cloudViewer::KDTree::checkNearerPointInSubTree(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistance(), cloudViewer::DistanceComputationTools::computeCloud2BoxEquation(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistanceWithOctree(), cloudViewer::DistanceComputationTools::computeCloud2RectangleEquation(), LSLocalModel::computeDistanceFromModelToPoint(), ComputeM3C2DistForPoint(), ComputeNeighborhood2MeshDistancesWithOctree(), DistanceMapGenerationTool::ComputeRadialDist(), flann::UniqueResultSet< DistanceType >::copy(), cloudViewer::visualization::rendering::GeometryBuffersBuilder::CreateIndexBuffer(), cloudViewer::GeometricalAnalysisTools::DetectSphereRobust(), cloudViewer::KDTree::distanceScanTree(), cloudViewer::visualization::rendering::MatrixInteractorLogic::Dolly(), flann::ensureSquareDistance(), ccCompass::estimateStructureNormals(), cloudViewer::t::geometry::npp::FilterGaussian(), flann::LinearIndex< Distance >::findNeighbors(), G3Point::getRandomColors(), cloudViewer::visualization::rendering::Gradient::GetTextureHandle(), flann::cuda::SingleResultSet< DistanceType >::insert(), flann::cuda::KnnResultSet< DistanceType, useHeap >::insert(), flann::cuda::RadiusKnnResultSet< DistanceType, useHeap >::insert(), flann::cuda::KnnRadiusResultSet< DistanceType, useHeap >::insert(), flann::cuda::RadiusResultSet< DistanceType >::insert(), flann::cuda::CountingRadiusResultSet< DistanceType >::insert(), flann::KDTreeCuda3dIndex< Distance >::knnSearchGpu(), cloudViewer::utility::IntersectionTest::LineSegmentsMinimumDistance(), cloudViewer::utility::IntersectionTest::LinesMinimumDistance(), cloudViewer::visualization::gui::PickPointsInteractor::OnPickImageDone(), flann::GonzalesCenterChooser< Distance >::operator()(), flann::KMeansppCenterChooser< Distance >::operator()(), flann::squareDistance< Distance, ElementType >::operator()(), flann::squareDistance< L2_Simple< ElementType >, ElementType >::operator()(), flann::squareDistance< L2_3D< ElementType >, ElementType >::operator()(), flann::squareDistance< L2< ElementType >, ElementType >::operator()(), flann::squareDistance< HellingerDistance< ElementType >, ElementType >::operator()(), flann::squareDistance< ChiSquareDistance< ElementType >, ElementType >::operator()(), ccThicknessTool::pointPicked(), knncpp::QueryHeap< Scalar >::pop(), FacetsClassifier::ProcessFamiliy(), knncpp::QueryHeap< Scalar >::push(), knncpp::BruteForce< Scalar, Distance >::query(), knncpp::MultiIndexHashing< Scalar >::query(), cloudViewer::benchmarks::Rand(), reduce_region_radius(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), cloudViewer::visualization::rendering::MatrixInteractorLogic::Rotate(), cloudViewer::visualization::rendering::CameraSphereInteractorLogic::Rotate(), cloudViewer::visualization::rendering::MatrixInteractorLogic::RotateWorld(), cloudViewer::MeshSamplingTools::samplePointsOnMesh(), flann::search_with_ground_truth(), cloudViewer::ManualSegmentationTools::segment(), cloudViewer::visualization::gui::SceneWidget::SetupCamera(), knncpp::QueryHeap< Scalar >::sort(), cloudViewer::CloudSamplingTools::subsampleCloudRandomly(), flann::test_index_checks(), flann::test_index_precision(), flann::test_index_precisions(), cloudViewer::visualization::gui::FlyInteractor::Tick(), and G3Point::G3PointAction::wolman().
|
static |
Compare doubles by relative error.
The resulting rounding error after floating point computations depend on the specific operations done. The same number computed by different algorithms could present different rounding errors. For a useful comparison, an estimation of the relative rounding error should be considered and compared to a factor times EPS. The factor should be related to the cumulated rounding error in the chain of computation. Here, as a simplification, a fixed factor is used.
Definition at line 181 of file lsd.c.
References fabs(), RELATIVE_ERROR_FACTOR, and TRUE.
Referenced by get_theta(), inter_hi(), inter_low(), and nfa().
|
static |
Enlarge the allocated memory of an n-tuple list.
Definition at line 287 of file lsd.c.
References ntuple_list_s::dim, error(), ntuple_list_s::max_size, NULL, and ntuple_list_s::values.
|
static |
Fatal error, print a message to standard-error output and exit.
Definition at line 159 of file lsd.c.
Referenced by FastMarchingForFacetExtraction::addCellToCurrentFacet(), qCanupoClassifDialog::browseClassifierFile(), FacetsClassifier::ByOrientation(), cloudViewer::t::io::RealSenseSensor::CaptureFrame(), CCMeshToDraco(), masc::Feature::checkValidity(), masc::ContextBasedFeature::checkValidity(), masc::DualCloudFeature::checkValidity(), masc::NeighborhoodFeature::checkValidity(), masc::PointFeature::checkValidity(), qCanupoProcess::Classify(), DONSegmentation::compute(), EuclideanClusterSegmentation::compute(), SACSegmentation::compute(), qM3C2Process::Compute(), ComputeCellStats(), ComputeClusterVolume(), qCanupoTools::ComputeCorePointsDescriptors(), ComputeMathOpWithNearestNeighbor(), cloudViewer::t::pipelines::registration::TransformationEstimationPointToPoint::ComputeRMSE(), cloudViewer::t::pipelines::registration::TransformationEstimationPointToPlane::ComputeRMSE(), cloudViewer::t::pipelines::registration::TransformationEstimationForDopplerICP::ComputeRMSE(), qFacets::createFacets(), define_qcc_io(), define_TrueKdTree(), cloudViewer::utility::filesystem::DeleteDirectory(), cloudViewer::GeometricalAnalysisTools::DetectCircle(), cloudViewer::GeometricalAnalysisTools::DetectSphereRobust(), q3DMASCPlugin::doClassifyAction(), qCanupoPlugin::doClassifyAction(), q3DMASCPlugin::doTrainAction(), enlarge_ntuple_list(), ccRasterizeTool::ExportGeoTiff(), qFacets::extractFacets(), masc::ContextBasedFeature::finish(), masc::NeighborhoodFeature::finish(), masc::PointFeature::finish(), QuaZIODevice::flush(), free_image_char(), free_image_double(), ccKdTreeForFacetExtraction::FuseCells(), ccRasterizeTool::generateContours(), get_theta(), LasScalarFieldLoader::handleScalarFields(), FastMarchingForFacetExtraction::init(), PythonInterpreter::initialize(), inter_hi(), inter_low(), isaligned(), ProfileLoader::Load(), Classifier::Load(), LasIOFilter::loadFile(), STEPFilter::loadFile(), CorePointDescSet::loadFromMSC(), DistanceMapGenerationDlg::loadOverlaySymbols(), new_image_char(), new_image_char_ini(), new_image_double(), new_image_double_ptr(), new_image_int(), new_ntuple_list(), nfa(), cloudViewer::t::io::RSBagReader::Open(), QuaGzipFile::open(), masc::NeighborhoodFeature::prepare(), masc::PointFeature::prepare(), pba::SparseBundleCPU< Float >::ProcessIndexCameraQ(), pba::SparseBundleCU::ProcessIndexCameraQ(), ReadCloud(), rect_nfa(), reduce_region_radius(), region_grow(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), cloudViewer::t::io::RealSenseSensor::ResumeRecord(), masc::PointFeature::retrieveField(), ri_del(), ri_end(), ri_inc(), ri_ini(), Classifier::save(), qCanupo2DViewDialog::saveClassifier(), PovFilter::saveToFile(), DRCFilter::saveToFile(), LasIOFilter::saveToFile(), cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane(), cloudViewer::TrueKdTree::split(), cloudViewer::t::io::RealSenseSensor::StartCapture(), FastMarchingForFacetExtraction::step(), ThrowForFileError(), TileLasReader(), and QuaZIODevice::writeData().
|
static |
Free memory used in image_char 'i'.
Definition at line 352 of file lsd.c.
References image_char_s::data, error(), and NULL.
|
static |
Free memory used in image_double 'i'.
Definition at line 478 of file lsd.c.
References image_double_s::data, error(), and NULL.
|
static |
|
static |
|
static |
Scale the input image 'in' by a factor 'scale' by Gaussian sub-sampling.
For example, scale=0.8 will give a result at 80% of the original size.
The image is convolved with a Gaussian kernel
before the sub-sampling to prevent aliasing.
The standard deviation sigma given by:
To be able to sub-sample at non-integer steps, some interpolation is needed. In this implementation, the interpolation is done by the Gaussian kernel, so both operations (filtering and sampling) are done at the same time. The Gaussian kernel is computed centered on the coordinates of the required sample. In this way, when applied, it gives directly the result of convolving the image with the kernel and interpolated to that particular position.
A fast algorithm is done using the separability of the Gaussian kernel. Applying the 2D Gaussian kernel is equivalent to applying first a horizontal 1D Gaussian kernel and then a vertical 1D Gaussian kernel (or the other way round). The reason is that
where
The algorithm first applies a combined Gaussian kernel and sampling in the x axis, and then the combined Gaussian kernel and sampling in the y axis.
|
static |
Compute region's angle as the principal inertia axis of the region.
The following is the region inertia matrix A:
where
Ixx = sum_i G(i).(y_i - cx)^2
Iyy = sum_i G(i).(x_i - cy)^2
Ixy = - sum_i G(i).(x_i - cx).(y_i - cy)
and
lambda1 and lambda2 are the eigenvalues of matrix A, with lambda1 >= lambda2. They are found by solving the characteristic polynomial:
det( lambda I - A) = 0
that gives:
lambda1 = ( Ixx + Iyy + sqrt( (Ixx-Iyy)^2 + 4.0*Ixy*Ixy) ) / 2
lambda2 = ( Ixx + Iyy - sqrt( (Ixx-Iyy)^2 + 4.0*Ixy*Ixy) ) / 2
To get the line segment direction we want to get the angle the eigenvector associated to the smallest eigenvalue. We have to solve for a,b in:
a.Ixx + b.Ixy = a.lambda2
a.Ixy + b.Iyy = b.lambda2
We want the angle theta = atan(b/a). It can be computed with any of the two equations:
theta = atan( (lambda2-Ixx) / Ixy )
or
theta = atan( Ixy / (lambda2-Iyy) )
When |Ixx| > |Iyy| we use the first, otherwise the second (just to get better numeric precision).
Definition at line 1568 of file lsd.c.
References angle_diff(), image_double_s::data, double_equal(), error(), fabs(), M_PI, NULL, point::x, image_double_s::xsize, and point::y.
|
static |
Interpolate y value corresponding to 'x' value given, in the line 'x1,y1' to 'x2,y2'; if 'x1=x2' return the larger of 'y1' and 'y2'.
The following restrictions are required:
Definition at line 1299 of file lsd.c.
References double_equal(), and error().
Referenced by ri_inc().
|
static |
Interpolate y value corresponding to 'x' value given, in the line 'x1,y1' to 'x2,y2'; if 'x1=x2' return the smaller of 'y1' and 'y2'.
The following restrictions are required:
Definition at line 1277 of file lsd.c.
References double_equal(), and error().
Referenced by ri_inc().
|
static |
Is point (x,y) aligned to angle theta, up to precision 'prec'?
Definition at line 893 of file lsd.c.
References image_double_s::data, error(), FALSE, M_2__PI, M_3_2_PI, NOTDEF, NULL, coorlist::x, image_double_s::xsize, coorlist::y, and image_double_s::ysize.
Referenced by rect_nfa(), and region_grow().
| 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.
Definition at line 2025 of file lsd.c.
References image.
Referenced by lsd_scale_region().
|
static |
Computes the direction of the level line of 'in' at each point.
The result is:
|
static |
Computes the natural logarithm of the absolute value of the gamma function of x using the Lanczos approximation. See http://www.rskey.org/gamma.htm
The formula used is
so
and q0 = 75122.6331530, q1 = 80916.6278952, q2 = 36308.2951477, q3 = 8687.24529705, q4 = 1168.92649479, q5 = 83.8676043424, q6 = 2.50662827511.
Definition at line 980 of file lsd.c.
References coorlist::x.
|
static |
Computes the natural logarithm of the absolute value of the gamma function of x using Windschitl method. See http://www.rskey.org/gamma.htm
The formula used is
so
This formula is a good approximation when x > 15.
Definition at line 1014 of file lsd.c.
References coorlist::x.
| double* lsd | ( | int * | n_out, |
| double * | img, | ||
| int | X, | ||
| int | Y | ||
| ) |
| double* lsd_scale | ( | int * | n_out, |
| double * | img, | ||
| int | X, | ||
| int | Y, | ||
| double | scale | ||
| ) |
| 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.
Definition at line 2212 of file lsd.c.
References LineSegmentDetection(), G3Point::quant(), and X.
Referenced by lsd_scale().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Create a new image_int of size 'xsize' times 'ysize', initialized to the value 'fill_value'.
Definition at line 447 of file lsd.c.
References image, and new_image_int().
|
static |
Create an n-tuple list and allocate memory for one element.
| dim | the dimension (n) of the n-tuple. |
Definition at line 261 of file lsd.c.
References ntuple_list_s::dim, error(), ntuple_list_s::max_size, NULL, ntuple_list_s::size, and ntuple_list_s::values.
|
static |
Computes -log10(NFA).
NFA stands for Number of False Alarms:
The value -log10(NFA) is equivalent but more intuitive than NFA:
Used this way, the bigger the value, better the detection, and a logarithmic scale is used.
| n,k,p | binomial parameters. |
| logNT | logarithm of Number of Tests |
The computation is based in the gamma function by the following relation:
We use efficient algorithms to compute the logarithm of the gamma function.
To make the computation faster, not all the sum is computed, part of the terms are neglected based on a bound to the error obtained (an error of 10% in the result is accepted).
Definition at line 1074 of file lsd.c.
References double_equal(), error(), fabs(), log_gamma, M_LN10, and TABSIZE.
Referenced by rect_nfa().
Copy one rectangle structure to another.
Definition at line 1183 of file lsd.c.
Referenced by rect_improve().
|
static |
Try some rectangles variations to improve NFA value. Only if the rectangle is not meaningful (i.e., log_nfa <= log_eps).
Definition at line 1756 of file lsd.c.
References rect::dx, rect::dy, M_PI, rect::p, rect::prec, rect_copy(), rect_nfa(), rect::width, rect::x1, rect::x2, rect::y1, and rect::y2.
|
static |
Compute a rectangle's NFA value.
Definition at line 1482 of file lsd.c.
References error(), isaligned(), nfa(), NULL, rect::p, rect::prec, ri_del(), ri_end(), ri_inc(), ri_ini(), rect::theta, rect_iter::x, image_double_s::xsize, rect_iter::y, and image_double_s::ysize.
Referenced by rect_improve().
|
static |
Reduce the region size, by elimination the points far from the starting point, until that leads to rectangle with the right density of region points or to discard the region if too small.
Definition at line 1869 of file lsd.c.
References image_char_s::data, image_double_s::data, dist(), error(), FALSE, NOTUSED, NULL, rect::p, rect::prec, region2rect(), TRUE, rect::width, point::x, rect::x, rect::x1, rect::x2, image_char_s::xsize, point::y, rect::y, rect::y1, and rect::y2.
|
static |
Refine a rectangle.
For that, an estimation of the angle tolerance is performed by the standard deviation of the angle at points near the region's starting point. Then, a new region is grown starting from the same point, but using the estimated angle tolerance. If this fails to produce a rectangle with the right density of region points, 'reduce_region_radius' is called to try to satisfy this condition.
|
static |
Computes a rectangle that covers a region of points.
Definition at line 1611 of file lsd.c.
Referenced by reduce_region_radius().
|
static |
Build a region of pixels that share the same angle, up to a tolerance 'prec', starting at point (x,y).
Definition at line 1704 of file lsd.c.
References image_char_s::data, image_double_s::data, error(), isaligned(), NULL, USED, point::x, image_char_s::xsize, image_double_s::xsize, point::y, image_char_s::ysize, and image_double_s::ysize.
|
static |
Free memory used by a rectangle iterator.
Definition at line 1314 of file lsd.c.
Referenced by rect_nfa().
|
static |
Check if the iterator finished the full iteration.
See details in rect_iter
Definition at line 1325 of file lsd.c.
References error(), NULL, rect_iter::vx, and rect_iter::x.
Referenced by rect_nfa(), and ri_inc().
|
static |
Increment a rectangle iterator.
See details in rect_iter
Definition at line 1341 of file lsd.c.
References cloudViewer::utility::ceil(), error(), inter_hi(), inter_low(), NULL, ri_end(), rect_iter::vx, rect_iter::vy, rect_iter::x, rect_iter::y, rect_iter::ye, and rect_iter::ys.
Referenced by rect_nfa(), and ri_ini().
Create and initialize a rectangle iterator.
See details in rect_iter
Definition at line 1411 of file lsd.c.
References cloudViewer::utility::ceil(), rect::dx, rect::dy, error(), NULL, offset, ri_inc(), rect_iter::vx, rect_iter::vy, rect::width, rect_iter::x, rect::x1, rect::x2, rect_iter::y, rect::y1, rect::y2, rect_iter::ye, and rect_iter::ys.
Referenced by rect_nfa().