Ask Your Question

pursang's profile - activity

2015-07-14 18:23:53 -0600 received badge  Editor (source)
2015-07-14 18:00:09 -0600 asked a question setSize dimensions assert in super resolution example

Any help is greatly appreciated !!

When I set the temporalAreaRadius to 1, I would expect to only need 2 input frames. When I only provide 2 frames for the frameSource, the assert in matrix.cpp (line 267 version 3.0.0) in setSize is triggered. The dimension is invalid. When accessing the dimension of the third element (which does not exist), it gives a random value 3921.

When I fill my frameSource until it contains 5 elements, this error disappears. I think it is because the frameSource calls nextFrame too much: when trying to open the Mat, it isn't there and the assertion is called.

Am I right about what is causing this assert error? How can I make sure to use only the input I want to use?

Has this got anything to do with the fact that the default value for temporalAreaRadius is 4, even though I set the parameter to be equal to 1 ?

edit: when I set temporalAreaRadius equal to 2, I need 7 input frames! This does not make sense to me. edit 2: it seems that when 5 input frames are required, they are all used. The assert for temporalAreaRadius is that it has to be >=1, so it looks like its possible to do super resolution with only 2 input frames.

Thanks in advance!

2015-06-24 21:03:41 -0600 answered a question Convert Mat to byte[] in C++

I just wanted to add something to berak's answer:

I encountered this problem as well, but had to return a jbyteArray (I'm using JNI and want a byte[] to return to the Java part). So I added this to obtain a jbyteArray out of the byte * bytes:

jbyteArray resultByteArray = env->NewByteArray(size);
env->SetByteArrayRegion(resultByteArray, 0, size, bytes);
env->ReleaseByteArrayElements(yuv, _yuv, 0);

return resultByteArray;
2015-06-24 20:58:55 -0600 received badge  Supporter (source)
2015-06-16 04:47:08 -0600 commented question Super resolution video format?

Indeed I know this example, but it doesn't provide any clues as to what the inputVideoName is...

2015-06-12 08:00:23 -0600 received badge  Enthusiast
2015-06-11 09:10:07 -0600 asked a question Super resolution video format?

Hello,

I can't find a list of possible video formats for super resolution. I've only seen people use .avi on forums. Would it work with .mp4 as well?

Where can I find documentation for this? (http://docs.opencv.org/modules/superr... doesn't quite cut it).

Thanks in advance for your reply!

2015-05-15 08:21:48 -0600 commented answer Super resolution on Android

Hi there! I've done some more research and I've come up with following observations:

It's hard to find just any tutorial that shows what you (and I) want.

Use JNI to create a native (C++) method. Download OpenCV4Android and include the necessary headers etc. I want to be able to do void superResolution(input, output) or <type output=""> superResolution(input).

Code for this JNI method has to be something like this: http://answers.opencv.org/question/18... http://answers.opencv.org/question/20...

My problem is that I have several yuv images, byte [ ], that act as low res input images. One thing I've seen is that frameSource needs a video as input. This is where I am stuck at the moment.

Any help is much appreciated

2015-05-08 17:08:31 -0600 received badge  Student (source)
2015-04-17 22:41:05 -0600 asked a question Super resolution on Android

Hi there,

I am fairly new to using OpenCV and was wondering:

There seems to be an OpenCV4Android API reference (http://docs.opencv.org/platforms/andr...), but from http://docs.opencv.org/index.html, the super resolution is in another scope, namely the OpenCV API reference.

So can I use OpenCV for super-resolution on Android without having to code in C++ ? Or do I write C++ code and put it in a library that in its turn can be used in an Android activity?

More specific, I don't want to use OpenCV for capturing frames, that is already done in the main application (yuv420sp format from Android). How do I perform super resolution on this type of image?

Also, I read on this Q&A forum that real-time super resolution is not really feasible on mobile devices.. Is this true?

I much appreciate any response !!