Ask Your Question

noamgot's profile - activity

2020-09-27 13:23:14 -0600 received badge  Popular Question (source)
2018-01-08 02:07:51 -0600 commented answer Destroy Java 'Mat'-Object

Just in case someone reaches here - it seems like the best practice is to call release() on your Mat object in the momen

2017-12-24 09:44:24 -0600 received badge  Supporter (source)
2017-12-24 08:45:06 -0600 commented answer Matlab min equivalent in OpenCV

@LBerger this doc is pretty bad anyway, and is mostly copied from the C++ doc (which is not to perfect either, but that'

2017-12-24 08:36:26 -0600 marked best answer Matlab min equivalent in OpenCV

I'm looking for an equivalent for the min function of Matlab in OpenCV, with this particular functionality (taken from the official Matlab documentation):

[M,I] = min(___) finds the indices of the minimum values of A and returns them in output vector I, using any of the input arguments in the previous syntaxes. If the minimum value occurs more than once, then min returns the index corresponding to the first occurrence.

In my specific case, I have 2 images. I want to create a new image with the minimum value of each pixel (wrt those 2 images), and I need to store a map (i.e a Mat object or something similar with a similar size) where each pixel of the map tells me whether the minimum value was taken from he first or the second image (You can consider them as nm2 image where I want to take the minimum value channel-wise, and want to be able to tell from which channel I got this value).

Is there an easy way to do this in OpenCV?

btw, It's for an Android app, so Java answers are preferred over C++. thanks.

2017-12-24 08:36:26 -0600 received badge  Scholar (source)
2017-12-24 08:36:15 -0600 commented answer Matlab min equivalent in OpenCV

nevermind, found it - compare(A,B,dst,Core.CMP_LT) will save in dst a binary matrix according to A<B

2017-12-24 08:35:20 -0600 commented answer Matlab min equivalent in OpenCV

nevermind, found it

2017-12-24 08:34:48 -0600 commented answer Matlab min equivalent in OpenCV

nevermind, found it: https://docs.opencv.org/java/2.4.2/org/opencv/core/Core.html#compare(org.opencv.core.Mat, org.openc

2017-12-24 08:20:51 -0600 commented answer Matlab min equivalent in OpenCV

It looks like something that might work..! Nice idea, I will check that and update... Do you know what might be the Open

2017-12-24 07:47:57 -0600 asked a question Matlab min equivalent in OpenCV

Matlab min equivalent in OpenCV I'm looking for an equivalent for the min function of Matlab in OpenCV, with this partic

2017-12-12 01:19:01 -0600 received badge  Enthusiast
2017-12-11 08:13:37 -0600 commented question Matlab and OpenCV4Android - different Mat dimensions

ok, thanks for your help anyway

2017-12-11 07:04:31 -0600 commented question Matlab and OpenCV4Android - different Mat dimensions

but how come the dimensions are different in the bitmap? in the Android app, the image is uploaded from the drawable dir

2017-12-11 06:22:34 -0600 commented question Matlab and OpenCV4Android - different Mat dimensions

it says 1128x1920 (h x w) - https://ibb.co/mvbEhw

2017-12-11 06:22:19 -0600 commented question Matlab and OpenCV4Android - different Mat dimensions

it says 112819920 (hw) - https://ibb.co/mvbEhw

2017-12-11 05:57:00 -0600 edited question Matlab and OpenCV4Android - different Mat dimensions

Matlab and OpenCV4Android - different Mat dimensions Ther's a piece of code I should translate from Matlab to OpenCV4And

2017-12-11 05:56:04 -0600 commented question Matlab and OpenCV4Android - different Mat dimensions

I added it in the original question

2017-12-11 05:55:46 -0600 edited question Matlab and OpenCV4Android - different Mat dimensions

Matlab and OpenCV4Android - different Mat dimensions Ther's a piece of code I should translate from Matlab to OpenCV4And

2017-12-11 04:50:58 -0600 received badge  Editor (source)
2017-12-11 04:50:58 -0600 edited question Matlab and OpenCV4Android - different Mat dimensions

Matlab and OpenCV4Android - different Mat dimensions Ther's a piece of code I should translate from Matlab to OpenCV4And

2017-12-11 04:45:08 -0600 asked a question Matlab and OpenCV4Android - different Mat dimensions

Matlab and OpenCV4Android - different Mat dimensions Ther's a piece of code I should translate from Matlab to OpenCV4And

2017-11-30 15:07:36 -0600 commented question Detect color space of loaded image - android OpenCV

Just to make sure that I got it - in my case I get a Bitmap from a URI (image uploaded from the gallery, or shot by the

2017-11-30 12:16:25 -0600 commented question Detect color space of loaded image - android OpenCV

@berak thanks for the comment. I'm not sure that I fully understood your last sentence - I'm using OpenCV4Android, so I

2017-11-30 12:16:12 -0600 commented question Detect color space of loaded image - android OpenCV

thanks for the comment. I'm not sure that I fully understood your last sentence - I'm using OpenCV4Android, so I should

2017-11-30 07:03:52 -0600 asked a question Detect color space of loaded image - android OpenCV

Detect color space of loaded image - android OpenCV Hi I'm developing an Android app using OpenCV for Android. The app a

2017-10-15 10:19:23 -0600 commented question common android project with opencv

There is no problem (yet...). I wonder should me and my friend should do (on each side) in order to work on this common

2017-10-15 10:03:55 -0600 asked a question common android project with opencv

common android project with opencv Me and my friend are developing an image processing Android app, and we plan to use O