mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 22:19:14 +08:00
Merge pull request #10419 from shortcipher3:master
This commit is contained in:
commit
2e33844f0d
@ -56,7 +56,7 @@ let plane0 = new cv.Mat();
|
||||
padded.convertTo(plane0, cv.CV_32F);
|
||||
let planes = new cv.MatVector();
|
||||
let complexI = new cv.Mat();
|
||||
let plane1 = new cv.Mat.zeros(padded.cols, padded.rows, cv.CV_32F);
|
||||
let plane1 = new cv.Mat.zeros(padded.rows, padded.cols, cv.CV_32F);
|
||||
planes.push_back(plane0);
|
||||
planes.push_back(plane1);
|
||||
cv.merge(planes, complexI);
|
||||
|
@ -61,9 +61,9 @@ let dst = new cv.Mat.zeros(src.rows, histSize[0] * scale,
|
||||
// draw histogram
|
||||
for (let i = 0; i < histSize[0]; i++) {
|
||||
let binVal = hist.data32F[i] * src.rows / max;
|
||||
let pioint1 = new cv.Point(i * scale, src.rows - 1);
|
||||
let pioint2 = new cv.Point((i + 1) * scale - 1, src.rows - binVal);
|
||||
cv.rectangle(dst, pioint1, pioint2, color, cv.FILLED);
|
||||
let point1 = new cv.Point(i * scale, src.rows - 1);
|
||||
let point2 = new cv.Point((i + 1) * scale - 1, src.rows - binVal);
|
||||
cv.rectangle(dst, point1, point2, color, cv.FILLED);
|
||||
}
|
||||
cv.imshow('canvasOutput', dst);
|
||||
src.delete(); dst.delete(); srcVec.delete(); mask.delete(); hist.delete();
|
||||
|
Loading…
Reference in New Issue
Block a user