opencv-processing and color format

edited March 2018 in Kinect

Hello,

PImage requires ARGB or RGB format. Using opencv-processing, i read in OpenCV class that the data matrix is BGRA format. Are some manipulations required to work with PImage and openCV objects ?

In particular when using code like :

Capture cam;
PImage camImage;

camImage = createImage(640, 480, RGB);
cam.read();
cam.updatePixels();
arrayCopy(cam.pixels, camImage.pixels);
opencv = new OpenCV(this, camImage);
grayHist = opencv.findHistogram(opencv.getGray(), 256);
rHist = opencv.findHistogram(opencv.getR(), 256);
gHist = opencv.findHistogram(opencv.getG(), 256);
bHist = opencv.findHistogram(opencv.getB(), 256);

Answers

  • I originaly posted in Library questions. Don't understand why this post in on the kinect section now...

Sign In or Register to comment.