Ask Your Question

Adi's profile - activity

2020-08-19 04:22:21 -0600 received badge  Notable Question (source)
2020-07-06 07:43:06 -0600 received badge  Popular Question (source)
2019-08-05 06:57:14 -0600 received badge  Notable Question (source)
2018-10-28 05:45:18 -0600 commented answer Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

We can continue the discussions here: https://github.com/opencv/opencv/issues/12974

2018-10-28 05:37:01 -0600 commented question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

I misunderstood the meaning of getVarCount(). I thought it was related to the number of examples in the training phase:

2018-10-28 05:36:27 -0600 commented question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

I misunderstood the meaning of getVarCount(). I thought it was related to the number of examples in the training phase.

2018-10-28 05:23:29 -0600 commented question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Yes, StatModel is an abstract interface, but all derived classes expect a model of some known size.

2018-10-28 05:22:09 -0600 commented question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

See above tho this is a question about API, so the code is rather simple/obvious...

2018-10-28 05:21:35 -0600 edited question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-10-28 05:20:56 -0600 edited question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-10-28 05:20:37 -0600 edited question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-10-28 05:03:26 -0600 edited question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-10-28 05:03:22 -0600 edited question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-10-28 04:58:11 -0600 asked a question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-10-28 04:58:06 -0600 asked a question Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File?

Checking the Sample Size Input for `cv::ml::StatModel::predict()` Loaded from File? I'm loading an ML trained model from

2018-08-20 03:21:35 -0600 received badge  Popular Question (source)
2017-12-24 02:51:39 -0600 received badge  Good Answer (source)
2017-08-09 08:38:50 -0600 commented answer Simple Way to Scale Channels

For completeness, this also works: img = img.mul(Scalar(1.2,0.5,.2));

2017-08-09 08:20:51 -0600 commented answer Simple Way to Scale Channels

You should past this answer here too: https://stackoverflow.com/questions/4...

2017-08-09 08:20:38 -0600 commented answer Simple Way to Scale Channels

@berak: Yeah, this seems to work. IIUC, this is essentially the same as using cv::transform(). It is matrix multiplication after a reshape.

2017-08-09 08:01:36 -0600 asked a question Simple Way to Scale Channels

It seems that given a multichannel image, e.g. BGR, img I cannot do this:

img *= cv::Scalar(1.5,0.5,2.1)

I'd like to scale each channel by a different float factor. Is there a simple way to do this? I could use cv::transform() but that seems like overkill (I also obviously don't want to iterate on all the pixels).

Any suggestions?

2017-06-10 08:54:06 -0600 asked a question What are CV_Luv2LBGR and CV_Lab2LBGR and how to use them?

I cam upon the undocumented color conversion codes: CV_Luv2LBGR and CV_Lab2LBGR (and their LRGB siblings). Apparently, they should return the L channel in addition to the BGR channels.

However, I cannot seem to get them to work, I suspect the code actually ignores this and simply returns BGR.

How can I use them and why aren't they documented?

2017-05-09 09:05:17 -0600 received badge  Popular Question (source)
2017-04-13 17:25:47 -0600 received badge  Famous Question (source)
2017-04-03 08:49:14 -0600 received badge  Self-Learner (source)
2017-04-03 08:31:49 -0600 answered a question Generate 1C Mask

Answering myself: use cv::inRange().
See also this SO answer.

2017-04-02 03:08:31 -0600 asked a question Generate 1C Mask

Given a multichannel image (e.g. BGR), what's the most efficient way to generate a (binary) 1C mask for pixel value equality?

cv::compare() works only for single channel images.

Using op== yields a 3C mask.
I can then reduce that but that seems like a wasteful second pass.

Is there a single-pass way of doing this?

2016-12-24 12:05:33 -0600 received badge  Nice Answer (source)
2016-12-04 07:46:21 -0600 edited answer how to sum a 3 channel matrix to a one channel matrix?

Hi,

here's a code sample without cv::reshape() or cv::reduce() :

cv::transform(m_in, m_out, cv::Matx13f(1,1,1))

2016-04-07 05:05:57 -0600 received badge  Notable Question (source)
2016-03-22 10:33:04 -0600 received badge  Nice Question (source)
2016-01-14 03:23:38 -0600 answered a question A raw format for testing purposes?

If your raw data is a normal image, then any lossless format that supports your raw data depth should be fine. Try PNG. It is a lossless image format.

2015-12-11 20:18:13 -0600 received badge  Notable Question (source)
2015-11-24 21:11:34 -0600 received badge  Popular Question (source)
2015-11-23 06:23:19 -0600 commented answer OpenCV logo

Indeed ;-)

2015-11-23 06:22:34 -0600 received badge  Enthusiast
2015-11-19 13:04:27 -0600 received badge  Commentator
2015-11-19 09:00:51 -0600 asked a question Where is guidedFilter()?

The docs tell of a function guidedFilter() in OpenCV (with some more goodies along with it).
I can't find anything about this in the 3.0.0 repo.

Is this in some special branch?

2015-11-19 08:58:04 -0600 commented question FAST or AGAST on Color Images

I added a sample. Both FAST and AGAST are very fast corner detectors, or center-surround contrast estimators. They're just the right approach for what I need, and in fact give pretty good results already. I am looking for generalize them just a bit more.

2015-11-19 08:55:51 -0600 edited question FAST or AGAST on Color Images

I want to detect tiny dark points/dots in a color image.
Is there an easy way to get FAST and/or AGAST to measure the score as the difference between the min-of-channels in the center p and the max-of-channels in the points around each center?

If this is not possible with the current API, how would one change FAST or AGAST to accept 2 images, one for the center and one for the outline?

Here's an example. It has two darker faint spots:
image description

The background is also noisy (and even more in other cases).
FAST and AGAST can actually detect the spot closer to the center, but the one on the bottom-right corner cannot be detected without detecting a lot of noise.

Since FAST/AGAST work only on gray-scale images, it would be a great addition if we could use 2 inputs, one for the center-pixel and one for the surrounding pixels.