Bug in the user_guide (Bug #2570)


Added by Igor Kushnir over 12 years ago. Updated about 12 years ago.


Status:Cancelled Start date:2012-11-26
Priority:Normal Due date:
Assignee:Kirill Kornyakov % Done:

0%

Category:documentation
Target version:2.4.3.2
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

On page http://docs.opencv.org/doc/user_guide/ug_mat.html

double minVal, maxVal;
minMaxLoc(sobelx, &minVal, &maxVal); //find minimum and maximum intensities
Mat draw;
sobelx.convertTo(draw, CV_8U, 255.0/(maxVal - minVal), -minVal);

last line should be
   sobelx.convertTo(draw, CV_8U, 255.0/(maxVal - minVal), -minVal * 255.0/(maxVal - minVal));

or
  const double alpha = 255.0/(maxVal - minVal);
  sobelx.convertTo(draw, CV_8U, alpha, -minVal * alpha);

Original line performs: color_intensity(x,y) = color_intensity(x,y) * alpha - minVal; - which I believe isn't intended.


Related issues

duplicates Bug #2559: User Guide bug Done 2012-11-20

Associated revisions

History

Updated by Kirill Kornyakov over 12 years ago

  • Description changed from On page http://docs.opencv.org/doc/user_guide/ug_mat.html ... double minVal,... to On page http://docs.opencv.org/doc/user_guide/ug_mat.html <pre> double... More
  • Target version set to 2.4.4
  • Category set to documentation
  • Subject changed from user_guide to Bug in the user_guide

Updated by Kirill Kornyakov over 12 years ago

Duplicate of #2559

  • Status changed from Open to Cancelled

Updated by Vsevolod Glumov about 12 years ago

  • Assignee set to Vsevolod Glumov

Updated by Vsevolod Glumov about 12 years ago

  • Assignee changed from Vsevolod Glumov to Kirill Kornyakov

Updated by Andrey Kamaev about 12 years ago

  • Target version changed from 2.4.4 to 2.4.3.2

Also available in: Atom PDF