Skip to content

Mser sample improvments - #12032

Merged
alalek merged 5 commits into
opencv:3.4from
Paul92:mser-sample-improvments
Jul 22, 2018
Merged

alalek merged 5 commits into
opencv:3.4from
Paul92:mser-sample-improvments

Conversation

@Paul92

@Paul92 Paul92 commented Jul 20, 2018

Copy link
Copy Markdown
Contributor

This pullrequest changes

Hi! Found a small issue in detect_mser.cpp example, with 2 arrays missing one element (see
#01ad0f0). I did also do some formatting and safety improvements.

Paul92 added 3 commits July 20, 2018 22:34
Wrong number of colors used to generate the synthetic images

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution!

Please take a look on comments below.

Comment thread samples/cpp/detect_mser.cpp Outdated

inf = static_cast<const ostringstream&>(ostringstream() << pAct.delta).str();
inf = dynamic_cast<const ostringstream&>(ostringstream() << pAct.delta).str();
s += " del. [" + inf + "]";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you touching this code, please make it more readable:

  • single ostringstream ss; object in the beginning of function.
  • no String objects
  • no s += statements
  • use ss << value << "text"; statements only
  • in the end: return ss.str()

@Paul92
Paul92 force-pushed the mser-sample-improvments branch from 7d30398 to 3b71586 Compare July 22, 2018 08:28

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! Thank you 👍

@alalek
alalek merged commit 8c75555 into opencv:3.4 Jul 22, 2018
@alalek alalek mentioned this pull request Jul 24, 2018
AhiyaHiya pushed a commit to AhiyaHiya/opencv that referenced this pull request Aug 1, 2018
…master

* master: (1187 commits)
  converted split() & merge() to wide univ intrinsics (opencv#12044)
  More issues found by static analysis
  objdetect(qr): update test code
  dnn: update tests for OpenVINO models
  ts: add findDataDirectory() function
  Do not copy cv_cpu_helper.h to parent if OpenCV is a submodule
  Add a sample which tests OpenVINO models
  Fixed several issues found by static analysis tools
  Merge pull request opencv#12032 from Paul92:mser-sample-improvments
  use struct member width_set/height_set to replace static width/height.
  dnn(ocl): don't use getUMat() for long live objects
  fix build error on Visual Studio 2013   * replace binary literal prefix to hexadecimal literal prefix
  dnn, IE backend: updated to match new interface
  videoio: add routines to query information about backends API
  Run entire SSDs from TensorFlow using Intel's Inference Engine
  uint8 inputs for deep learning networks
  ts: fix PERF_TEST() macro to allow test_case name reusing
  core(test): remove verbose messages
  Enable debug assertions for static analysis builds
  AVI container: verbose error messages
  ...
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
Mser sample improvments (opencv#12032)

* Fixed bug in detect_mser sample
Wrong number of colors used to generate the synthetic images

* Formatting improvements

* Using safer casts

* Improved readability of legend generation

* Various readability fixes in detect_mser sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants