Skip to content

Commit 5b87b26

Browse files
committed
Beginning the process of renaming library and package.
Rename main class from OpenCVPro to OpenCV. Update all examples.
1 parent 5bf3931 commit 5b87b26

58 files changed

Lines changed: 477 additions & 481 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

distribution/OpenCVPro-1/download/OpenCVPro-1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ version = 1 # This must be parsable as an int
4646

4747
# The version as the user will see it. If blank, the version attribute will be
4848
# used here.
49-
prettyVersion = 0.3.0 # This is treated as a String
49+
prettyVersion = 0.3.1 # This is treated as a String
204 KB
Binary file not shown.

distribution/OpenCVPro-1/download/OpenCVPro.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ version = 1 # This must be parsable as an int
4646

4747
# The version as the user will see it. If blank, the version attribute will be
4848
# used here.
49-
prettyVersion = 0.3.0 # This is treated as a String
49+
prettyVersion = 0.3.1 # This is treated as a String
204 KB
Binary file not shown.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import gab.opencvpro.*;
22
import org.opencv.core.Core;
33
import org.opencv.core.Mat;
44

5-
OpenCVPro beforeCv, afterCv;
5+
OpenCV beforeCv, afterCv;
66
PImage before, after, colorDiff, grayDiff;
77
void setup() {
88
before = loadImage("before.jpg");
99
after = loadImage("after.jpg");
1010
size(before.width, before.height);
1111

12-
beforeCv = new OpenCVPro(this, before);
13-
afterCv = new OpenCVPro(this, after);
12+
beforeCv = new OpenCV(this, before);
13+
afterCv = new OpenCV(this, after);
1414

1515
// NOTE: important to not do the color diff
1616
// before calling these, as this makes
@@ -19,8 +19,8 @@ void setup() {
1919
afterCv.gray();
2020

2121

22-
OpenCVPro.diff(beforeCv.getBufferColor(), afterCv.getBufferColor());
23-
OpenCVPro.diff(beforeCv.getBufferGray(), afterCv.getBufferGray());
22+
OpenCV.diff(beforeCv.getBufferColor(), afterCv.getBufferColor());
23+
OpenCV.diff(beforeCv.getBufferGray(), afterCv.getBufferGray());
2424

2525
colorDiff = beforeCv.getColorImage();
2626

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import gab.opencvpro.*;
2+
3+
OpenCV opencv;
4+
5+
void setup() {
6+
PImage src = loadImage("robot_light.jpg");
7+
src.resize(800, 0);
8+
size(src.width, src.height);
9+
10+
opencv = new OpenCV(this, src);
11+
}
12+
13+
void draw() {
14+
image(opencv.getOutput(), 0, 0);
15+
PVector loc = opencv.max();
16+
17+
stroke(255, 0, 0);
18+
strokeWeight(4);
19+
noFill();
20+
ellipse(loc.x, loc.y, 10, 10);
21+
}
22+
205 KB
Loading

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
import gab.opencvpro.*;
22

3-
import org.opencv.core.Core;
4-
import org.opencv.core.Scalar;
5-
import org.opencv.core.Mat;
6-
7-
83
PImage img;
9-
OpenCVPro opencv;
4+
OpenCV opencv;
105

116
void setup(){
127
img = loadImage("test.jpg");
138
size(img.width, img.height, P2D);
14-
opencv = new OpenCVPro(this, img);
15-
9+
opencv = new OpenCV(this, img);
1610
}
1711

1812
void draw(){

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import gab.opencvpro.*;
22

33
PImage src;
44
ArrayList<PVector> cornerPoints;
5-
OpenCVPro opencv;
5+
OpenCV opencv;
6+
67
void setup() {
78
src = loadImage("checkerboard.jpg");
89
src.resize(500, 0);
910
size(src.width, src.height, P2D);
1011

11-
opencv = new OpenCVPro(this, src);
12+
opencv = new OpenCV(this, src);
1213
opencv.gray();
1314

1415
cornerPoints = opencv.findChessboardCorners(9,6);

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import org.opencv.calib3d.StereoBM;
44
import org.opencv.core.CvType;
55
import org.opencv.calib3d.StereoSGBM;
66

7-
OpenCVPro ocvL, ocvR;
7+
OpenCV ocvL, ocvR;
88
PImage imgL, imgR, depth1, depth2;
99

1010
void setup() {
1111

1212
imgL = loadImage("scene_l.jpg");
1313
imgR = loadImage("scene_r.jpg");
14-
ocvL = new OpenCVPro(this, imgL);
14+
ocvL = new OpenCV(this, imgL);
1515

16-
ocvR = new OpenCVPro(this, imgR);
16+
ocvR = new OpenCV(this, imgR);
1717

1818
size(ocvL.width * 2, ocvL.height*2);
1919

@@ -22,12 +22,12 @@ void setup() {
2222
Mat left = ocvL.getBufferGray();
2323
Mat right = ocvR.getBufferGray();
2424

25-
Mat disparity = OpenCVPro.imitate(left);
25+
Mat disparity = OpenCV.imitate(left);
2626

2727
StereoSGBM stereo = new StereoSGBM(0, 32, 3, 128, 256, 20, 16, 1, 100, 20, true);
2828
stereo.compute(left, right, disparity );
2929

30-
Mat depthMat = OpenCVPro.imitate(left);
30+
Mat depthMat = OpenCV.imitate(left);
3131
disparity.convertTo(depthMat, depthMat.type());
3232

3333
depth1 = createImage(depthMat.width(), depthMat.height(), RGB);

0 commit comments

Comments
 (0)