Skip to content

Commit 553259e

Browse files
committed
Fix typo
1 parent ff99218 commit 553259e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public boolean onTouch(View v, MotionEvent event) {
159159
for (int i = 0; i < mBlobColorHsv.val.length; i++)
160160
mBlobColorHsv.val[i] /= pointCount;
161161

162-
mBlobColorRgba = converScalarHsv2Rgba(mBlobColorHsv);
162+
mBlobColorRgba = convertScalarHsv2Rgba(mBlobColorHsv);
163163

164164
Log.i(TAG, "Touched rgba color: (" + mBlobColorRgba.val[0] + ", " + mBlobColorRgba.val[1] +
165165
", " + mBlobColorRgba.val[2] + ", " + mBlobColorRgba.val[3] + ")");
@@ -182,7 +182,7 @@ public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
182182
if (mIsColorSelected) {
183183
mDetector.process(mRgba);
184184
List<MatOfPoint> contours = mDetector.getContours();
185-
Log.e(TAG, "Contours count: " + contours.size());
185+
Log.i(TAG, "Contours count: " + contours.size());
186186
Imgproc.drawContours(mRgba, contours, -1, CONTOUR_COLOR);
187187

188188
Mat colorLabel = mRgba.submat(4, 68, 4, 68);
@@ -195,7 +195,7 @@ public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
195195
return mRgba;
196196
}
197197

198-
private Scalar converScalarHsv2Rgba(Scalar hsvColor) {
198+
private Scalar convertScalarHsv2Rgba(Scalar hsvColor) {
199199
Mat pointMatRgba = new Mat();
200200
Mat pointMatHsv = new Mat(1, 1, CvType.CV_8UC3, hsvColor);
201201
Imgproc.cvtColor(pointMatHsv, pointMatRgba, Imgproc.COLOR_HSV2RGB_FULL, 4);

samples/swift/ios/ColorBlobDetection/ColorBlobDetection/ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ViewController: UIViewController, CvVideoCameraDelegate2 {
101101
let pointCount = touchedRect.width*touchedRect.height
102102
blobColorHsv = blobColorHsv.mul(Scalar.all(1.0/Double(pointCount)))
103103

104-
blobColorRgba = converScalarHsv2Rgba(hsvColor: blobColorHsv)
104+
blobColorRgba = convertScalarHsv2Rgba(hsvColor: blobColorHsv)
105105

106106
NSLog("Touched rgba color: (\(blobColorRgba.val[0]), \(blobColorRgba.val[1]), \( blobColorRgba.val[2]), \(blobColorRgba.val[3])")
107107

@@ -113,7 +113,7 @@ class ViewController: UIViewController, CvVideoCameraDelegate2 {
113113
}
114114
}
115115

116-
func converScalarHsv2Rgba(hsvColor:Scalar) -> Scalar {
116+
func convertScalarHsv2Rgba(hsvColor:Scalar) -> Scalar {
117117
let pointMatRgba = Mat()
118118
let pointMatHsv = Mat(rows: 1, cols: 1, type: CvType.CV_8UC3, scalar: hsvColor)
119119
Imgproc.cvtColor(src: pointMatHsv, dst: pointMatRgba, code: .COLOR_HSV2RGB_FULL, dstCn: 4)

0 commit comments

Comments
 (0)