mirror of
https://github.com/zebrajr/opencv.git
synced 2026-01-15 12:15:17 +00:00
Merge pull request #12246 from sturkmen72:move_enums
* Update core.hpp * Update imgproc.hpp * Update ImgprocTest.java * Update CameraCalibrator.java * Update OnCameraFrameRender.java * Update FindContoursDemo.java * Update IntroductionToSVMDemo.java * Update NonLinearSVMsDemo.java * Update IntroductionToPCADemo.java * Update Smoothing.java * Update MainActivity.java * Update CalcBackProjectDemo1.java * Update CornerSubPixDemo.java * Update CornerDetectorDemo.java * Update GoodFeaturesToTrackDemo.java
This commit is contained in:
committed by
Alexander Alekhin
parent
6356403964
commit
d8cd1d8fcc
@@ -145,7 +145,7 @@ class CalcBackProject1 {
|
||||
hist.get(0, 0, histData);
|
||||
for (int i = 0; i < bins; i++) {
|
||||
Imgproc.rectangle(histImg, new Point(i * binW, h),
|
||||
new Point((i + 1) * binW, h - Math.round(histData[i] * h / 255.0)), new Scalar(0, 0, 255), Core.FILLED);
|
||||
new Point((i + 1) * binW, h - Math.round(histData[i] * h / 255.0)), new Scalar(0, 0, 255), Imgproc.FILLED);
|
||||
}
|
||||
Image histImage = HighGui.toBufferedImage(histImg);
|
||||
histImgLabel.setIcon(new ImageIcon(histImage));
|
||||
|
||||
@@ -79,7 +79,7 @@ class SmoothingRun {
|
||||
dst = Mat.zeros(src.size(), src.type());
|
||||
Imgproc.putText(dst, caption,
|
||||
new Point(src.cols() / 4, src.rows() / 2),
|
||||
Core.FONT_HERSHEY_COMPLEX, 1, new Scalar(255, 255, 255));
|
||||
Imgproc.FONT_HERSHEY_COMPLEX, 1, new Scalar(255, 255, 255));
|
||||
|
||||
return displayDst(DELAY_CAPTION);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class FindContours {
|
||||
Mat drawing = Mat.zeros(cannyOutput.size(), CvType.CV_8UC3);
|
||||
for (int i = 0; i < contours.size(); i++) {
|
||||
Scalar color = new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256));
|
||||
Imgproc.drawContours(drawing, contours, i, color, 2, Core.LINE_8, hierarchy, 0, new Point());
|
||||
Imgproc.drawContours(drawing, contours, i, color, 2, Imgproc.LINE_8, hierarchy, 0, new Point());
|
||||
}
|
||||
|
||||
imgContoursLabel.setIcon(new ImageIcon(HighGui.toBufferedImage(drawing)));
|
||||
|
||||
@@ -115,7 +115,7 @@ class CornerSubPix {
|
||||
matCorners.get(0, 0, matCornersData);
|
||||
for (int i = 0; i < corners.rows(); i++) {
|
||||
Imgproc.circle(copy, new Point(cornersData[i * 2], cornersData[i * 2 + 1]), radius,
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Core.FILLED);
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Imgproc.FILLED);
|
||||
matCornersData[i * 2] = cornersData[i * 2];
|
||||
matCornersData[i * 2 + 1] = cornersData[i * 2 + 1];
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ class CornerDetector {
|
||||
if (McData[i * srcGray.cols() + j] > harrisMinVal
|
||||
+ (harrisMaxVal - harrisMinVal) * qualityLevelVal / MAX_QUALITY_LEVEL) {
|
||||
Imgproc.circle(harrisCopy, new Point(j, i), 4,
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Core.FILLED);
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Imgproc.FILLED);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,7 +162,7 @@ class CornerDetector {
|
||||
if (shiTomasiData[i * srcGray.cols() + j] > shiTomasiMinVal
|
||||
+ (shiTomasiMaxVal - shiTomasiMinVal) * qualityLevelVal / MAX_QUALITY_LEVEL) {
|
||||
Imgproc.circle(shiTomasiCopy, new Point(j, i), 4,
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Core.FILLED);
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Imgproc.FILLED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class GoodFeaturesToTrack {
|
||||
int radius = 4;
|
||||
for (int i = 0; i < corners.rows(); i++) {
|
||||
Imgproc.circle(copy, new Point(cornersData[i * 2], cornersData[i * 2 + 1]), radius,
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Core.FILLED);
|
||||
new Scalar(rng.nextInt(256), rng.nextInt(256), rng.nextInt(256)), Imgproc.FILLED);
|
||||
}
|
||||
|
||||
imgLabel.setIcon(new ImageIcon(HighGui.toBufferedImage(copy)));
|
||||
|
||||
@@ -23,16 +23,16 @@ class IntroductionToPCA {
|
||||
// Here we lengthen the arrow by a factor of scale
|
||||
q.x = (int) (p.x - scale * hypotenuse * Math.cos(angle));
|
||||
q.y = (int) (p.y - scale * hypotenuse * Math.sin(angle));
|
||||
Imgproc.line(img, p, q, colour, 1, Core.LINE_AA, 0);
|
||||
Imgproc.line(img, p, q, colour, 1, Imgproc.LINE_AA, 0);
|
||||
|
||||
// create the arrow hooks
|
||||
p.x = (int) (q.x + 9 * Math.cos(angle + Math.PI / 4));
|
||||
p.y = (int) (q.y + 9 * Math.sin(angle + Math.PI / 4));
|
||||
Imgproc.line(img, p, q, colour, 1, Core.LINE_AA, 0);
|
||||
Imgproc.line(img, p, q, colour, 1, Imgproc.LINE_AA, 0);
|
||||
|
||||
p.x = (int) (q.x + 9 * Math.cos(angle - Math.PI / 4));
|
||||
p.y = (int) (q.y + 9 * Math.sin(angle - Math.PI / 4));
|
||||
Imgproc.line(img, p, q, colour, 1, Core.LINE_AA, 0);
|
||||
Imgproc.line(img, p, q, colour, 1, Imgproc.LINE_AA, 0);
|
||||
//! [visualization1]
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class IntroductionToSVMDemo {
|
||||
// Show the training data
|
||||
//! [show_data]
|
||||
int thickness = -1;
|
||||
int lineType = Core.LINE_8;
|
||||
int lineType = Imgproc.LINE_8;
|
||||
Imgproc.circle(image, new Point(501, 10), 5, new Scalar(0, 0, 0), thickness, lineType, 0);
|
||||
Imgproc.circle(image, new Point(255, 10), 5, new Scalar(255, 255, 255), thickness, lineType, 0);
|
||||
Imgproc.circle(image, new Point(501, 255), 5, new Scalar(255, 255, 255), thickness, lineType, 0);
|
||||
|
||||
@@ -148,7 +148,7 @@ public class NonLinearSVMsDemo {
|
||||
// ----------------------- 5. Show the training data--------------------------------------------
|
||||
//! [show_data]
|
||||
int thick = -1;
|
||||
int lineType = Core.LINE_8;
|
||||
int lineType = Imgproc.LINE_8;
|
||||
float px, py;
|
||||
// Class 1
|
||||
float[] trainDataData = new float[(int) (trainData.total() * trainData.channels())];
|
||||
|
||||
Reference in New Issue
Block a user