Ask Your Question

bginer's profile - activity

2014-01-23 03:53:38 -0500 commented answer Reading mat files in java

But what if you dont the size of the mat ? suppose reading from a raw file ?

2014-01-21 23:13:12 -0500 commented question Passing Camera frame in android as a Mat

@berak : What input array ? I dont get it ?

2014-01-21 05:31:23 -0500 commented question Passing Camera frame in android as a Mat

I tried both it doesnt work

2014-01-21 03:43:23 -0500 received badge  Editor (source)
2014-01-21 03:42:36 -0500 asked a question Passing Camera frame in android as a Mat

In the openCV implementation of Android part I have a method called onCameraFrame() which returns the input frame

public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
return inputFrame.rgba();

and in the jni side I am receiving it as

Mat mMat1 = (*((Mat*)inputMat));

But when i try to compare it I get this error

OpenCV Error: Assertion failed (type == src2.type() && src1.cols == 
src2.cols && (type == CV_32F || type == CV_8U)) in void 
cv::batchDistance(cv::InputArray, cv::InputArray, cv::OutputArray, int, 
cv::OutputArray, int, int, cv::InputArray, int, bool), file 
/home/reports/ci/slave/50-SDK/opencv/modules/core/src/stat.cpp, line 1797

How to solve this error and pass the Cameraframe mats for comparison ?

2014-01-20 23:47:22 -0500 received badge  Scholar (source)
2014-01-20 00:20:16 -0500 asked a question Write hexadecimal color in pixel of an image

Now a color pixel is defined by F5F5C7, But the pixel of image takes only RGB like this<cv::Vec3b>(0,0)[0]= 25;<cv::Vec3b>(0,0)[1]= 35;<cv::Vec3b>(0,0)[2]= 45;

So my question is how do I write F5F5C7 in respective color pixel ?

2013-12-18 03:08:14 -0500 received badge  Student (source)
2013-12-18 00:59:37 -0500 asked a question Reading mat files in java

Hi, I can read an image in java using Highgui.imread(filename), but how to load an Mat file that has been saved on the file system ??