Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The different params between large segment and #4

Closed
fightmoney opened this issue Mar 10, 2022 · 1 comment
Closed

The different params between large segment and #4

fightmoney opened this issue Mar 10, 2022 · 1 comment

Comments

@fightmoney
Copy link

fightmoney commented Mar 10, 2022

Hi, the code is very good! But I have some questions.
In you main.cpp, detector short segments use follow params

 // Gaussian kernel size
  int ksize = 5;
  // Sigma of the gaussian kernel
  float sigma = 1;
  // The threshold of pixel gradient magnitude.
  // Only those pixels whose gradient magnitude are larger than
  // this threshold will be taken as possible edge points.
  float gradientThreshold = 30;
  // If the pixel's gradient value is bigger than both of its neighbors by a
  // certain anchorThreshold, the pixel is marked to be an anchor.
  uint8_t anchorThreshold = 8;
  // Anchor testing can be performed at different scan intervals, i.e.,
  // every row/column, every second row/column
  unsigned int scanIntervals = 2;

  // Minimum line segment length
  int minLineLen = 15;
  // Threshold used to check if a list of edge points for a line segment
  double lineFitErrThreshold = 0.2;
  // Threshold used to check if a new pixel is part of an already fit line segment
  double pxToSegmentDistTh = 1.5;
  // Threshold used to validate the junction jump region. The first eigenvalue of the gradient
  // auto-correlation matrix should be at least junctionEigenvalsTh times bigger than the second eigenvalue
  double junctionEigenvalsTh = 10;
  // the difference between the perpendicular segment direction and the direction of the gradient
  // in the region to be validated must be less than junctionAngleTh radians
  double junctionAngleTh = 10 * (M_PI / 180.0);
  // The threshold over the validation criteria. For ELSED, it is the gradient angular error in pixels.
  double validationTh = 0.15;

  // Whether to validate or not the generated segments
  bool validate = true;
  // Whether to jump over junctions
  bool treatJunctions = true;
  // List of junction size that will be tested (in pixels)
  std::vector<int> listJunctionSizes = {5, 7, 9};

when you detect large segments. what is the params?

@iago-suarez
Copy link
Owner

Hii, thanks a lot for your interest. All the parameters are the same except the listJunctionSizes by an empty list, this prevents the algorithm from trying to jump at gradient discontinuities and therefore, it detects only short segments:

ELSED/src/main.cpp

Lines 43 to 45 in 36b4547

upm::ELSEDParams params;
params.listJunctionSizes = {};
upm::ELSED elsed_short(params);

If this answers your question, please close the issue.

Best,
Iago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants