We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on my last issue #152 (comment) I learn how to use them from another post and I did it like this
protected void processImage(byte[] data, int width, int height) { int f = SUBSAMPLING_FACTOR; if (grayImage == null || grayImage.width() != width/f || grayImage.height() != height/f) { grayImage = IplImage.create(width/f, height/f, IPL_DEPTH_8U, 1); } bgrFrame = IplImage.create(width/f, height/f, IPL_DEPTH_32F, 3); frameCvt = new AndroidFrameConverter(); OpenCVFrameConverter.ToIplImage converter = new OpenCVFrameConverter.ToIplImage(); bgrFrame = converter.convertToIplImage(frameCvt.convert(dataGambar, width/f, height/f,));
But the result is the image that contained by bgrFrame is like this
Did I do it wrong?
The text was updated successfully, but these errors were encountered:
Call AndroidFrameConverter.convert() this way: convert(data, width, height)
AndroidFrameConverter.convert()
convert(data, width, height)
Sorry, something went wrong.
It works! thank you for your help :D But it become slow because the image is too large. But thanks 👍
We can use OpenCV for faster conversion, something like shown in #156.
No branches or pull requests
Based on my last issue #152 (comment)
I learn how to use them from another post and I did it like this
protected void processImage(byte[] data, int width, int height) {
int f = SUBSAMPLING_FACTOR;
if (grayImage == null || grayImage.width() != width/f || grayImage.height() != height/f) {
grayImage = IplImage.create(width/f, height/f, IPL_DEPTH_8U, 1);
}
bgrFrame = IplImage.create(width/f, height/f, IPL_DEPTH_32F, 3);
frameCvt = new AndroidFrameConverter();
OpenCVFrameConverter.ToIplImage converter = new OpenCVFrameConverter.ToIplImage();
bgrFrame = converter.convertToIplImage(frameCvt.convert(dataGambar, width/f, height/f,));
But the result is the image that contained by bgrFrame is like this
Did I do it wrong?
The text was updated successfully, but these errors were encountered: