Closed huahua713 closed 7 years ago
There's a port of that sample here: https://github.com/bytedeco/sample-projects/tree/master/opencv-stitching
@saudet thank you so much for taking your time to help me!
yes, I basically copy the code from that example and put it in android.
for poc, I hardcoded most of the args passed from command line and hopefully I didn't miss any.
I don't understand why I'm getting
Insufficient memory (Failed to allocate 1101915588 bytes) in void* cv::OutOfMemoryError(size_t), file /home/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/android-arm/opencv-3.2.0/modules/core/src/alloc.cpp, line 52
both images are about 500-700k only. Do you have a working example for android?
@saudet app crashes on int status = stitcher.stitch(imgs, pano);
@saudet can you reopen it? I still cant get it to work...
am I adding the correct gradle?
what did I do wrong? I also do get other error like
java.lang.RuntimeException: /home/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/android-arm/opencv-3.2.0/modules/core/src/umatrix.cpp:380: error: (-215) u != 0 in function void cv::UMat::create(int, const int*, int, cv::UMatUsageFlags)
@saudet I know this isnt an issue/bug/improvement, but the question should be closed when the answer really solves my problem. I'm still struggling...help please
especially this has been a major headache for me in the past 2 weeks... :(
You just need more memory. Your device doesn't have enough memory.
@saudet thank you! but I feel I did something wrong. this is the pixel from google. if it crashes due to insufficient memory, i believe majority of android device won't work.
Am I referencing the right lib? compile group: 'org.bytedeco', name: 'javacv-platform', version: '1.3.2'
I noticed the pom.xml in example has opencv-stitching
but I can't manage to reference it or translate to gradle.
Many thanks!
Yes, this won't work for most devices. You'll need to use smaller images or some other algorithm that uses less memory.
@saudet I see....Thank you. Do you happen to have or know any java wrapper that does image stitching?
Hi, I'm totally new to opencv. been searching online for more than 2 weeks but still no luck...
Can someone please tell me exactly how to stitch image using javacv?
I have added the following to my app level gradle
compile group: 'org.bytedeco', name: 'javacv-platform', version: '1.3.2'
and below is in
onCreate
I keep getting error code = 1 or OOM exception. any help is super appreciated. please!
img1.png and img2.png are downloaded from here under input images https://ramsrigoutham.com/2012/11/22/panorama-image-stitching-in-opencv/