Ask Your Question

Ayberk Özgür's profile - activity

2020-10-19 07:18:24 -0600 received badge  Notable Question (source)
2017-01-22 13:43:59 -0600 received badge  Popular Question (source)
2014-10-09 03:36:49 -0600 commented question Android Native Camera: dlopen errors

I'm having a similar issue with a 4.4.x device where deploying the apk with libnative_camera_r4.3.0.so and libnative_camera_r4.4.0.so causes a dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1EbRKNS_2spINS_19IGraphicBufferAllocEEE" error. Deploying with libnative_camera_r4.4.0.so only solves the problem. I'm guessing that when a libnative_camera_r*.so lib is loaded, it is not differentiated with respect to the current Android version, probably due to trusting OpenCV Manager keeping only the correct version around. I'm not going to use OpenCV manager anytime soon, so this is a bit tedious having to deploy multiple apks for multiple Android versions.

2014-09-30 01:21:09 -0600 received badge  Teacher (source)
2014-09-29 11:15:20 -0600 received badge  Self-Learner (source)
2014-09-29 09:32:40 -0600 commented question How to get camera preview sizes natively for Android & desktop

I think these kinds of answers just clutter the Q&A space and give the impression that this is not a competent community, hence the downvote.

Also, there is a "flag offensive" button in the answers for "unfriendly" behavior.

2014-09-29 09:31:47 -0600 commented question How to get camera preview sizes natively for Android & desktop

Second, I don't believe that downvotes are reserved for "bad behavior" or "clearly wrong information", it also applies to where an answer is obviously found from the first page on Google search results. Honestly, try searching for "android get camera preview sizes"; no one should ask some question here whose answer can be found easily on Google (or whose answer is RTFM). Moreover in this case, the code desired in the question has a nativity priority. The given answer "You can try using android.hardware.Camera parameters like this:" obviously indicates that the answerer did not even properly read the question, let alone considering giving an answer in the case that he/she is not familiar with the meaning of "native".

2014-09-29 09:27:48 -0600 commented question How to get camera preview sizes natively for Android & desktop

First, this question is perfectly related to OpenCV: In order to even be able to get the live camera image in a hardware independent manner, you first need the supported preview sizes. As OpenCV provides the mechanism to access the camera (VideoCapture), it should provide the mechanism to access the supported preview sizes as well. I shouldn't need Qt or any other platform to obtain this information. See my answer below.

2014-09-29 09:09:49 -0600 answered a question How to get camera preview sizes natively for Android & desktop

In Android, the following can be done to get the list of supported preview resolutions:

cv::VideoCapture camera(0);
camera.open(0);
union {const char* str; double res;} previewSizes;
previewSizes.res = camera.get(CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING);
printf("%s",previewSizes.str);

This will yield a string as follows:

960x720,1280x720,1184x666,960x640,704x576,640x480,352x288,320x240

The string needs parsing - not that difficult. This information is extracted by following the source code and it is not documented; any platform-specific camera capture code is in fact not documented. I will try to add the proper documentation to at least the Android side with a PR in the future.

2014-09-28 04:09:23 -0600 commented answer How to get camera preview sizes natively for Android & desktop

Natively if possible please, this is the generic Java way that I'm already aware of. And this isn't even preview sizes, it's picture sizes.

2014-09-28 04:07:36 -0600 received badge  Critic (source)
2014-09-23 02:55:35 -0600 asked a question How to get camera preview sizes natively for Android & desktop

I would like to know how to get the supported camera preview sizes on Android and desktop, possibly uniformly. I'm on a completely native framework (Qt) and would like to do this fully natively if possible. Currently, I'm using VideoCapture to get image data on both platforms but the size is basically guessed.