Git Product home page Git Product logo

opencv-processing's Introduction

OpenCV for Processing

A Processing library for the OpenCV computer vision library.

OpenCV for Processing is based on OpenCV's official Java bindings. It attempts to provide convenient wrappers for common OpenCV functions that are friendly to beginners and feel familiar to the Processing environment.

See the included examples below for an overview of what's possible and links to the relevant example code. Complete documentation is available here:

OpenCV for Processing reference

OpenCV for Processing is based on the officially supported OpenCV Java API, currently at version 2.4.5. In addition to using the wrapped functionality, you can import OpenCV modules and use any of its documented functions: OpenCV javadocs. See the advanced examples (HistogramSkinDetection, DepthFromStereo, and Marker Detection) below for details. (This style of API was inspired by Kyle McDonald's ofxCv addon for OpenFrameworks.)

Contributions welcome.

Installing

OpenCV for Processing currently supports Mac OSX, 32-bit and 64-bit Windows, 32- and 64-bit Linux. Android support is hopefully coming soon (pull requests welcome).

NB: When running on the Mac, make sure you have Processing set to 64-bit mode in the Preferences

See here for the latest release.

Examples

LiveCamTest

Access a live camera and do image processing on the result, specifically face detection.

Code: LiveCamTest.pde

Note: There's a bug that prevents live camera access in current versions of Processing 2.0 on machines with a Retina display.

FaceDetection

Detect faces in images.

Screen Shot 2013-04-08 at 1.22.18 PM

Code: FaceDetection.pde

BrightnessContrast

Adjust the brightness and contrast of color and gray images.

brightness and contrast

Code: BrightnessContrast.pde

FilterImages

Basic filtering operations on images: threshold, blur, and adaptive thresholds.

Screen Shot 2013-04-12 at 1.42.30 PM

Code: FilterImages.pde

FindContours

Find contours in images and calculate polygon approximations of the contours (i.e., the closest straight line that fits the contour).

contours with polygon approximations

Code: FindContours.pde

FindEdges

Three different edge-detection techniques: Canny, Scharr, and Sobel.

Screen Shot 2013-04-10 at 2.03.59 AM

Code: FindEdges.pde

FindLines

Find straight lines in the image using Hough line detection.

Hough line detection

Code: HoughLineDetection.pde

BrightestPoint

Find the brightest point in an image.

finding the brightest point

Code: BrightestPoint.pde

RegionOfInterest

Assign a sub-section (or Region of Interest) of the image to be processed. Video of this example in action here: Region of Interest demo on Vimeo.

region of interest

Code: RegionOfInterest.pde

ImageDiff

Find the difference between two images in order to subtract the background or detect a new object in a scene.

Screen Shot 2013-04-11 at 2.10.35 PM

Code: ImageDiff.pde

DilationAndErosion

Thin (erode) and expand (dilate) an image in order to close holes. These are known as "morphological" operations.

dilation and erosion

Code: DilationAndErosion.pde

BackgroundSubtraction

Detect moving objects in a scene. Use background subtraction to distinguish background from foreground and contour tracking to track the foreground objects.

Background Subtraction

Code: BackgroundSubtraction.pde

WorkingWithColorImages

Demonstration of what you can do color images in OpenCV (threshold, blur, etc) and what you can't (lots of other operations).

color operations: threshold and blur

Code: WorkingWithColorImages.pde

ColorChannels

Separate a color image into red, green, blue or hue, saturation, and value channels in order to work with the channels individually.

ColorChannels

Code: ColorChannels

FindHistogram

Demonstrates use of the findHistogram() function and the Histogram class to get and draw histograms for grayscale and individual color channels.

gray, red, green, blue histograms

Code: FindHistogram.pde

HueRangeSelection

Detect objects based on their color. Demonstrates the use of HSV color space as well as range-based image filtering.

Hue-based color detection

Code: HueRangeSelection.pde

CalibrationDemo (in progress)

An example of the process involved in calibrating a camera. Currently only detects the corners in a chessboard pattern.

Screen Shot 2013-05-04 at 2.03.23 AM

Code: CalibrationDemo.pde

HistogramSkinDetection

A more advanced example. Detecting skin in an image based on colors in a region of color space. Warning: uses un-wrapped OpenCV objects and functions.

Screen Shot 2013-05-04 at 2.25.18 PM

Code: HistogramSkinDetection.pde

DepthFromStereo

An advanced example. Calculates depth information from a pair of stereo images. Warning: uses un-wrapped OpenCV objects and functions.

Screen Shot 2013-04-12 at 2.27.30 AM

Code: DepthFromStereo.pde

WarpPerspective (in progress)

Un-distort an object that's in perspective. Coming to the real API soon.

Warp Perspective

Code: WarpPerspective.pde

MarkerDetection

An in-depth advanced example. Detect a CV marker in an image, warp perspective, and detect the number stored in the marker. Many steps in the code. Uses many un-wrapped OpenCV objects and functions.

Screen Shot 2013-04-12 at 12.20.17 AM

Code: MarkerDetection.pde

MorphologyOperations

Open and close an image, or do more complicated morphological transformations.

Morphology operations

Code: MorphologyOperations.pde

opencv-processing's People

Contributors

arturoc avatar atduskgreg avatar gohai avatar jbobrow avatar jmwohl avatar jorditost avatar kylemcdonald avatar mudphone avatar ncmikkelsen avatar p0ulp avatar qwzybug avatar zmike808 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencv-processing's Issues

UnsatisfiedLinkError is raised anytime new OpenCV is called.

After following these instructions to install OpenCV, I keep receiving the following error any time I try to run any of the examples:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J at org.opencv.core.Mat.n_Mat(Native Method) at org.opencv.core.Mat.<init>(Mat.java:471) at gab.opencv.OpenCV.init(Unknown Source) at gab.opencv.OpenCV.loadFromPImage(Unknown Source) at gab.opencv.OpenCV.<init>(Unknown Source) at HueRangeSelection.setup(HueRangeSelection.java:33) at processing.core.PApplet.handleDraw(PApplet.java:1608) at processing.core.PApplet.run(PApplet.java:1530) at java.lang.Thread.run(Thread.java:695)

I've googled around and no one seems to have had similar problems.

Upgrade to 2.4.7

And, more generally, improve system for updating to a new OpenCV build so it doesn't seem so difficult.

Add support for submat

Something along the lines of:

Mat grayMat = opencv.getBufferGray();
Mat roiMat = grayMat.submat(roi.y, roi.y+roi.height, roi.x, roi.x+roi.width );
opencv.setBufferGray(roiMat);

Should it replace the working buffer?

Get only the Region Of Interest (ROI) as output

Is there a way to only get the region of interest as image output?

The method opencv.getOutput() outputs the entire image with the region of interest on it. But would it be possible to get it independently?

Windows/Processing 64 bit support?

I love this library. I would have paid for it if I had had to. I am currently having a conflict in which one of my important libraries is 64bit only, and this one is 32bit only. Is there a chance this could one day be changed? Thanks! I still love it

OpenCV 0.4.4 Library Format + Other

I've been trying to run the opencv for processing library (0.4.4). There have been a couple issues to note.

first the library folder format is incorrect.
Currently: opencv-processing-latest>lib>opencv-245.jar
Should be: opencv_processing>library>opencv_processing.jar

opencv_processing.jar is missing all together in 0.4.4 but not in 0.4.3

After correcting these and changing opencv-245.jar to opencv_processing.jar to get the library to show up in the sketch>import library menus in Processing 2.1, I get an error "the package 'gab' does not exist". This just leads me to believe that I can't change opencv-245.jar to opencv_processing.jar.

Adding in the opencv_processing.jar from 0.4.3 allowed the examples to run. But given that it is form an older rev I would think that this is not a sufficient solution.

lastly 0.4.4 is missing library.properties which my understand is that its just a nice to have.

more versatile inRange()

I'm trying to do blob tracking based on both Saturation and Hue. Your OpenCV.inRange() function works great for doing either one but overwrites the input Mat object. It'd be great if that were as versatile as the inRange() function in the core library that allows multiple range arrays and/or outputs to a different object. That way you could add multiple filters to the same image more easily, for example filter for blue AND red hue, or hue and saturation etc. Unless there's a way to that already that I've missed, without having to save intermediate PImages.

Add support for ROI?

Is there a possible way to do this internally a la? http://ubaa.net/shared/processing/opencv/opencv_roi.html

This is supported in the API by initializing a new Mat as an ROI into an existing Mat like so:

Mat original = opencv.getBufferGray();
Mat roi = new Mat(original, new Rect(200,200,400,400));
Imgproc.threshold(roi, roi, 100, 255, Imgproc.THRESH_BINARY);

However, not quite sure how to support this internally. Maybe initialize a new OpenCVPro object like this:

OpenCVPro roi = new OpenCVPro(this, opencv, 50,50,100,100);

where "opencv" is an existing OpenCVPro object and the last four arguments are the x, y, width, and height of the ROI.

draw() function for Contour

Something like:

void drawContours(ArrayList<MatOfPoint> cntrs) {
  for (MatOfPoint contour : cntrs) {
    beginShape();
    Point[] points = contour.toArray();
    for (int i = 0; i < points.length; i++) {
      vertex((float)points[i].x, (float)points[i].y);
    }
    endShape();
  }
}

Rename "buffer" to "channel"

In the getBufferGray(), getBufferColor(), etc. methods. Maybe this should be Channel?

The point is that these return a Mat rather than an image. Maybe just use Mat as in the name?

Regularize edge finding method names

Right now, they're findCannyEdges(), findScharrX(), findScharrY(), and findSobelEdges(). Would be good to get them down to two words each two (maybe scharr takes the direction as an argument?)

Info text printed twice when working with video (Capture)

When working with video as source (using the Capture class) I get this info text twice.

OpenCV for Processing 0.4.2 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0
OpenCV for Processing 0.4.2 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0

If I load an image as source it's printed normally. It doesn't affect the sketch, but maybe there is some redundancy in the initialization process.

"Add library" broken link in Processing 2.1.1

java.io.FileNotFoundException: https://github.com/atduskgreg/opencv-processing/releases/download/latest/opencv_processing.zip
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at processing.app.contrib.ContributionManager.download(ContributionManager.java:69)
at processing.app.contrib.ContributionManager$1.run(ContributionManager.java:123)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: https://github.com/atduskgreg/opencv-processing/releases/download/latest/opencv_processing.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getHeaderFieldLong(Unknown Source)
at java.net.URLConnection.getContentLengthLong(Unknown Source)
at java.net.URLConnection.getContentLength(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(Unknown Source)
at processing.app.contrib.ContributionManager.download(ContributionManager.java:65)
... 2 more

Histograms don't draw on Windows

It's spitting out an error about "Smooth level 2 is not available. Using 1 instead." This is happening on many sketches where drawing still appears to happen.

screen shot 2013-07-03 at 9 55 07 pm

Working with other cameras

I found that when working with an external camera I found wraping the opencv code in if video.available() {} statement worked best

Any plan to support OSX 10.6 in the future?

Hi Greg, thanks for this library. Just wondering if there is a chance it will work on OSX 10.6 at any point? Tried as I may, I couldn't get it to show up in Contributed Libraries.

toCv() function is slow

I’ve found a bottleneck with loadImage() that reduces frameRate in Processing when you have to process an image in realtime en every draw() routine.
That happens here, when you convert the PImage to CV format. Is there any way to make this conversion more efficient?

/**

  • Convert a Processing PImage to an OpenCV Mat.
  • (Inspired by Kyle McDonald’s ofxCv’s toOf())
    *
  • @param img
  • The PImage to convert.
  • @param m
  • The Mat to receive the image data.
    */
    public static void toCv(PImage img, Mat m){
    BufferedImage image = (BufferedImage)img.getNative();
    int[] matPixels = ((DataBufferInt)image.getRaster().getDataBuffer()).getData();

ByteBuffer bb = ByteBuffer.allocate(matPixels.length * 4);
IntBuffer ib = bb.asIntBuffer();
ib.put(matPixels); //<---this is very slow

byte[] bvals = bb.array();

m.put(0,0, bvals);
}

Would be great if someone can improve this function (I dont now how).

Thank you!,
Juan Pablo

Detect 32-bit mode and give proper error

Currently an incomprehensible error is generated when in 32-bit mode. Instead we should generate a sensible error recommending the user set the setting in Preferences. We can detect 32-bit mode thusly:

System.getProperty("sun.arch.data.model")

Add support for just loading the correct dylibs

Hi Greg

It seems like you've done a ton of work setting up the correct system libs for the specific platforms. I find myself wanting to use Mat and other classes in my Processing code, and I need to do this to make it all work:

import gab.opencv.*;
OpenCV opencv;
opencv = new OpenCV(this, "test.jpg");

After that, I can use the core OpenCV classes. It might be awesome to make those internal setup function public, so someone could do something like this:

import gab.opencv.*;
OpenCV.init();

And it just worked. Anyway, just a few thoughts.

Setup Question: prerequisites: core.jar and pde

Hi there,
I try to setup the openCV processing stuff, since it looks great.
Unfortunately on my linux system I face two troubles - maybe correlating to eclipse...

A) I am not able to embed/include the core.jar
-> where is it located, where can I download?
B) I am not familiar with the extension "*pde"
-> what is it good for?
-> which setting is good for syntax highlighting in eclipse?
-> while googling, I found the "eclipse pde" stuff, does this correlate?
Or am I totally mistaken?

Thanks,
günter

Convexity Defects

Hi. I'm trying to get convexity defects of a contour (in imgproc.java).
I added method to your Contour class to wrap it, but I'm getting an error (happens after a little while though). Any ideas much appreciated (or maybe you've already implemented this somewhere that I haven't come across?)

thanks!

In Contour Class:
(note: there's probably a more elegant way to form the int[][] but that shouldn't be a problem as far as I can see)

public int[][] getConvexityDefects(){

        MatOfInt hull = new MatOfInt();
        MatOfPoint points = new MatOfPoint(pointMat);
        MatOfInt4 defects = new MatOfInt4();

        Imgproc.convexHull(points, hull);
        Imgproc.convexityDefects(points, hull, defects);

        int[] defectsArray = defects.toArray();
        int[][] d = new int[defects.height()][4];
        int i = 0;
        int i4 = 0;

        while(i4 < defectsArray.length){
            d[i][0] = defectsArray[i4];
            d[i][1] = defectsArray[i4+1];
            d[i][2] = defectsArray[i4+2];
            d[i][3] = defectsArray[i4+3];
            i++;
            i4+=4;
        }

        return d;
    }

The error:

OpenCV Error: Assertion failed (hull.checkVector(1, CV_32S) > 2) in convexityDefects, file /Users/matthewepler/opencv-2.4.5/modules/imgproc/src/contours.cpp, line 1971
Exception in thread "Animation Thread" CvException [org.opencv.core.CvException: /Users/matthewepler/opencv-2.4.5/modules/imgproc/src/contours.cpp:1971: error: (-215) hull.checkVector(1, CV_32S) > 2 in function convexityDefects
]
    at org.opencv.imgproc.Imgproc.convexityDefects_0(Native Method)
    at org.opencv.imgproc.Imgproc.convexityDefects(Imgproc.java:3182)
    at gab.opencv.Contour.getConvexityDefects(Contour.java:109)

Bug in distribution example, HoughLineDetection

void setup() {
  PImage src = loadImage("film_scan.jpg");
  src.resize(0, 800);
  size(src.width, src.height, P2D);

  opencv = new OpenCV(this, src);
  //  opencv.findCannyEdges(20, 75);
  opencv.findSobelEdges(0, 1);
  opencv.threshold(50);


  lines = ;
}

The line line in setup() throws an error.

cascade cannot load from path with non-ASCI characters

if you have path to libraries like this for example

C:\Users\Mačřščýřžýěšč\Documents\Processing\libraries..........cascades

Processing cannot load cascade. Moving whole Processing folder from Documents folder somewhere else (with non-ASCII named folder) and changing path in Preferences fixes the problem.

Linux support

I was wondering what is needed to add Linux support.

I have tried adding the native linux OpenCV library in the following path:
opencv_processing/library/linux/libopencv_java245.so
and everything seemed to worked correctly.
I guess the proper way of doing this would be to use the system's libopencv_java245.so
but some distributions do note have them in their repositories yet (e.g. Debian/Stable).

A part from this is there anything else missing for it to work on Linux?

Exception when switching from HSB to RGB mode with video

In my draw() function I'm doing some preprocessing before I get the contours. For it I tell OpenCV to work in HSV color space. After it, I want to load the source image again and use the RGB color space, because it seems to work better to find contours. Here's the code:

  src = loadImage("test.jpg");
  size(src.width, src.height, P2D);

  opencv = new OpenCV(this, src);
  opencv.useColor(HSB); 
  opencv.setGray(opencv.getS().clone());
  opencv.threshold(95);
  opencv.erode();
  processedImage = opencv.getSnapshot();

  // Get Contours
  contours = opencv.findContours(true, true);
  contoursImage = opencv.getSnapshot();

  // Get Canny Edges
  opencv.loadImage(src);
  opencv.useColor(RGB); // Change to RGB color space
  opencv.findCannyEdges(20,75);
  cannyImage = opencv.getSnapshot();

It works fine when working with a source image, but throws an exception when using the video from the webcam (Capture class):

java.lang.IndexOutOfBoundsException: Index: 3, Size: 1

With a source image the sketch output looks like:

bildschirmfoto 2013-12-19 um 22 57 57

Here the rest of the error:

java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 3, Size: 1
    at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
    at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100)
    at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205)
    at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
    at javax.media.opengl.Threading.invoke(Threading.java:191)
    at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:483)
    at processing.opengl.PGL.requestDraw(PGL.java:1149)
    at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1604)
    at processing.core.PApplet.run(PApplet.java:2176)
    at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 1
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at gab.opencv.OpenCV.ARGBtoBGRA(Unknown Source)
    at gab.opencv.OpenCV.loadImage(Unknown Source)
    at EdgesDetectionVideo.draw(EdgesDetectionVideo.java:44)
    at processing.core.PApplet.handleDraw(PApplet.java:2305)
    at processing.opengl.PGL$PGLListener.display(PGL.java:2601)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:588)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:572)
    at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1034)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:909)
    at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Still a problem linking libraries on 64 bit linux

Trying to run the examples either gives me a vague message like:

"A library relies on native code that's not available."

Or, it gives a more specific message like:

java.lang.UnsatisfiedLinkError:/~/sketchbook/libraries/opencv_processing/library/linux64/libopencv_java245.so:libopencv_nonfree.so.2.4: cannot open shared object file: No such file or directory

The examples run fine for me after adding
"export LD_LIBRARY_PATH=~/sketchbook/libraries/opencv_processing/library/linux64
$LD_LIBRARY_PATH"

to the bash profile (~/.bash_profile)

It looked like this linking issue should have been fixed in a recent release. Is the version downloaded from the Processing PDE outdated?

My OS is Fedora 19.

Add support for dilate and erode

Imgproc.dilate(sprocketProcessor.getBufferGray(), sprocketProcessor.getBufferGray(), new Mat());

Imgproc.erode(edgeProcessor.getBufferGray(), edgeProcessor.getBufferGray(), new Mat());

Maybe including example of using them together for hole closing.

Need ability to resize working Mats

Sometimes, the main Mat will change size.

For example, the in-progress WarpPerspective example, changes the shape and size of the Mat being warped. In order to do that in-place (i.e. without creating a new image as that example currently does) we need the ability to alter the width and height of the current OpenCV object and all the working Mats.

The same would hold for providing support for submat()

setROI should check if ROI is within dimensions of currentBuffer

So the user doesn't have to do these kinds of checks:

if (mouseX > 0 && 
    mouseX < width-roiWidth && 
    mouseY > 0 && 
    mouseY < height-roiHeight) {

    opencv.setROI(mouseX, mouseY, roiWidth, roiHeight);
}

But what should the result be? bufferROI simply not set? Should setROI() also return false?

--

Sorry, my processing was reset to 32 bit so the problem was related to this.
Please delete.

Add support for working in HSV color space

  • useColor(HSB) (with errors for options that aren't hsv or rgb)
  • getBufferHue(), getBufferSaturation(), getBufferValue() functions
  • set colorSpace variable
  • check to see if we're in HSV and populate buffers on loadImage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.