Ask Your Question

podlipensky's profile - activity

2016-09-17 14:28:11 -0500 received badge  Popular Question (source)
2016-09-17 14:28:11 -0500 received badge  Famous Question (source)
2016-09-17 14:28:11 -0500 received badge  Notable Question (source)
2016-02-21 12:34:18 -0500 commented answer Estimate white background

OTSU thresholding won't work perfectly with illumination, i.e. if some drawing is light on a photo due to illumination, it will be filtered out by OTSU thresholding since it will be done in grayscale mode. Any other ideas?

2016-02-11 09:54:08 -0500 received badge  Enthusiast
2016-02-10 12:54:01 -0500 commented answer Estimate white background

@jeanpat, unfortunately the operation above makes resulting image black. I believe this is due to erosion. But overall approach might work just fine if I can use reverse-erosion... Playing with it.

2016-02-10 10:14:01 -0500 commented answer Estimate white background

If I convert image to grayscale, I'll loose an ability to detect outliers, but let me take a closer look to this method...

2016-02-10 09:36:16 -0500 asked a question Estimate white background


I have image with white uneven background (due to lighting). I'm trying to estimate background color and transform image into image with true white background. For this I estimated white color for each 15x15 pixels block based on its luminosity. So I've got the following map (on the right): image description

Now I want to interpolate color so it will be more smooth transition from 15x15 block to neighboring block, plus I want it to eliminate outliers (pink dots on left hand side). Could anyone suggest good technique/algorithm for this? (Ideally within OpenCV library, but not necessary)

2016-01-24 13:40:13 -0500 asked a question Output Mat object in XCode7.2 debugger console


How can I inspect values of the Mat object in XCode 7.2 debugger console (lldb)? I've tried commands like p myMat and po myMat with no luck.

UPDATE simple cout << myMat works in the code, but even then every single value from matrix is on its own line, so it is hard to comprehend what matrix consists of. Can I improve this somehow?

Thank you.

2016-01-21 09:59:42 -0500 asked a question Iterate over multiple vectors of uneven Mat


I have two vectors with uneven Mat

vector<Mat> delta_nabla_w = GetWeightsMatDelta();  // [Mat(10, 20), Mat(20, 40), Mat(40, 10)]
vector<Mat> nabla_w = GetWeightsMatZeros(); // [Mat(10, 20), Mat(20, 40), Mat(40, 10)]

I need to iterate over both of them at the same time and sum them up. I've tried this:

for(int j = 0; j < nabla_w.size(); j++) {<Mat>(j) +=<Mat>(j);

But it gives me an error Mat does not refer to a value, which kind of make sense. Could you please help me on this one?

2014-02-14 11:40:58 -0500 asked a question How to convert Mat to CV_16SC3

I'm trying to feed Mat images to Blender class, but I receive the following error:

OpenCV Error: Assertion failed (img.type() == CV_16SC3) in feed, file /opt/local/var/macports/build/_opt_mports_dports_graphics_opencv/opencv/work/opencv-2.4.8/modules/stitching/src/blenders.cpp, line 125

I receive the images form video stream, not sure why it is of incorrect type (I don't pre-process images after capture.retrieve(prevImg);. The question is how to convert Mat image to CV_16SC3 format using C++ api?

2014-02-14 11:27:46 -0500 received badge  Scholar (source)
2014-02-14 11:27:45 -0500 received badge  Supporter (source)
2014-02-14 10:29:23 -0500 received badge  Editor (source)
2014-02-14 10:28:33 -0500 asked a question Problem with Blender

Hi, I'm trying to use Blender (from stitching_details.cpp) example:

Blender* blender = Blender::createDefault(Blender::FEATHER, false);

FeatherBlender* fb = dynamic_cast<featherblender*>(static_cast<blender*>(blender));


But on a second line I've got the following error during runtime:


What I'm doing wrong? I use XCode 5.0.2 and OpenCV 2.4