Skip to content

Commit 60251cc

Browse files
committed
Color-only image processing functions don't raise an exception,
but only print out an error message, a la Shiffman.
1 parent c863ce7 commit 60251cc

19 files changed

Lines changed: 48 additions & 47 deletions
-92 Bytes
Binary file not shown.
-92 Bytes
Binary file not shown.

distribution/OpenCVPro-1/examples/WorkingWithColorImages/WorkingWithColorImages.pde

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import gab.opencvpro.*;
2-
import org.opencv.core.Mat;
3-
import org.opencv.imgproc.Imgproc;
42

53
OpenCVPro opencv;
6-
PImage threshold;
4+
PImage threshold, blur;
75

86
void setup() {
97
PImage img = loadImage("test.jpg");
@@ -16,14 +14,16 @@ void setup() {
1614
opencv.useColor();
1715

1816
// A lot of OpenCV operations only work on gray.
19-
// But some do work in color, like threshold:
17+
// But some do work in color, like threshold, blur, findCannyEdges, findChessboardCorners, etc.:
2018
opencv.threshold(75);
2119
threshold = opencv.getSnapshot();
2220

21+
opencv.blur(30);
22+
blur = opencv.getSnapshot();
23+
2324
// If you try an operation that does not work in color
2425
// it will raise an exception and print out a message:
2526
try{
26-
opencv.loadImage(img);
2727
opencv.adaptiveThreshold(591, 1);
2828
} catch (Exception e){
2929
}
@@ -33,5 +33,6 @@ void setup() {
3333
void draw() {
3434
scale(0.5);
3535
image(threshold, 0, 0);
36+
image(blur, threshold.width,0);
3637
}
3738

distribution/OpenCVPro-1/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1>OpenCVPro</h1>
4242
<h2>OpenCVPro</h2>
4343
<p>
4444
A library by <a href="http://gregborenstein.com">Greg Borenstein</a> for the <a href="http://www.processing.org" target="_blank">Processing</a> programming environment.<br>
45-
Last update, 06/24/2013.
45+
Last update, 06/25/2013.
4646
</p>
4747
<p>
4848
Computer vision with OpenCV based on the official OpenCV Java API.<br>

distribution/OpenCVPro-1/reference/allclasses-frame.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_45) on Mon Jun 24 16:59:16 EDT 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_45) on Tue Jun 25 10:25:22 EDT 2013 -->
66
<TITLE>
77
All Classes (Javadocs: OpenCVPro)
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-06-24">
10+
<META NAME="date" CONTENT="2013-06-25">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
1313

distribution/OpenCVPro-1/reference/allclasses-noframe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_45) on Mon Jun 24 16:59:16 EDT 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_45) on Tue Jun 25 10:25:22 EDT 2013 -->
66
<TITLE>
77
All Classes (Javadocs: OpenCVPro)
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-06-24">
10+
<META NAME="date" CONTENT="2013-06-25">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
1313

distribution/OpenCVPro-1/reference/constant-values.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_45) on Mon Jun 24 16:59:16 EDT 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_45) on Tue Jun 25 10:25:22 EDT 2013 -->
66
<TITLE>
77
Constant Field Values (Javadocs: OpenCVPro)
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-06-24">
10+
<META NAME="date" CONTENT="2013-06-25">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
1313

distribution/OpenCVPro-1/reference/deprecated-list.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_45) on Mon Jun 24 16:59:16 EDT 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_45) on Tue Jun 25 10:25:22 EDT 2013 -->
66
<TITLE>
77
Deprecated List (Javadocs: OpenCVPro)
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-06-24">
10+
<META NAME="date" CONTENT="2013-06-25">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
1313

distribution/OpenCVPro-1/reference/gab/opencvpro/Contour.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_45) on Mon Jun 24 16:59:16 EDT 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_45) on Tue Jun 25 10:25:22 EDT 2013 -->
66
<TITLE>
77
Contour (Javadocs: OpenCVPro)
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-06-24">
10+
<META NAME="date" CONTENT="2013-06-25">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
1313

distribution/OpenCVPro-1/reference/gab/opencvpro/OpenCVPro.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_45) on Mon Jun 24 16:59:16 EDT 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_45) on Tue Jun 25 10:25:22 EDT 2013 -->
66
<TITLE>
77
OpenCVPro (Javadocs: OpenCVPro)
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-06-24">
10+
<META NAME="date" CONTENT="2013-06-25">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
1313

0 commit comments

Comments
 (0)