Ask Your Question

501 Not Implemented's profile - activity

2020-11-01 15:46:29 -0600 received badge  Notable Question (source)
2020-09-14 13:48:48 -0600 received badge  Notable Question (source)
2020-05-11 05:57:34 -0600 received badge  Popular Question (source)
2019-04-07 02:01:05 -0600 received badge  Popular Question (source)
2018-03-26 08:31:17 -0600 received badge  Popular Question (source)
2018-03-13 03:47:59 -0600 received badge  Nice Question (source)
2018-01-18 07:04:32 -0600 received badge  Popular Question (source)
2016-11-30 16:14:32 -0600 received badge  Famous Question (source)
2016-01-22 15:55:14 -0600 received badge  Nice Question (source)
2016-01-12 06:05:48 -0600 received badge  Good Question (source)
2015-10-19 03:33:14 -0600 received badge  Notable Question (source)
2015-06-18 09:41:14 -0600 received badge  Nice Question (source)
2015-03-30 14:45:46 -0600 asked a question how to get value of energy from the grabcut algorithm

Hello, Is there a option to get the energyvalue of the the grabcut algorithm?

greetings

2015-03-12 14:59:58 -0600 commented answer How to map colors

Hi, to do this with every color produce a lot of overhead. But thanks for your solution :) for a little count of colors this works fine at least because there not iterate the whole image. Actually that is for 8*-bit images, see the docs for better understanding, but LUT should be fast

2015-03-12 10:45:53 -0600 asked a question How to map colors

Hello, I want to map some colors in a image to another color the colors are available as HSV (8UC3).

For example:

mapping all pixels with H= 90, S= 128, V = 128 to H= 70, S= 128, V = 128
mapping all pixels with H= 100, S= 128, V = 128 to H= 110, S= 128, V = 128
and so on...

I know about:

  • cv::InRange: very slow, if I have a big map
  • cv::LUT: allows only 256 colors?

has someone an idea or a solution for this problem?

For a first approach it suffice to get a mask of all these colors.

EDIT

one idea: iterate the image, and create a map from all colors associated by pixels (color[H,S,V] -> vector of (X,Y)- Coordinate) after that I can iterate the colors I want to change and set all pixel of the vector to the new color. This solution is very slow, I think but maybe much faster as cv::inrange ? (for maybe 5,000 colors) What do you think?

EDIT 2

I've tested my idea on a i5 with a color wheel image (2400 x 2400 pixels) in RGB - space image description

In this test I save the pointers to the pixel in a map (vector of iterators associated by a color id) After that, I iterate all colors in the map (65453 colors) and set the inverted color to each pixel of the vector This solution needs round about 2,5 seconds (I meassured with getTickCount()) and after some optimazion I run it with 1 second. Faster than a concatination of cv::inrange

Maybe someone has another solution, that is faster than this?

best regards

2015-03-09 16:34:23 -0600 commented answer efficient cv::inrange for multiple ranges

mhnm, lookup tables only for CV_8UC1 isn't it?

2015-03-09 12:01:30 -0600 commented answer efficient cv::inrange for multiple ranges

yeah lookup tables, good idea. thank you :)

2015-03-09 11:28:16 -0600 commented question efficient cv::inrange for multiple ranges

yes, but this approach has a worse performance. Later, I want run my app on a tablet. An idea is to implement my own cv::inrange but I don't know if this is realy faster

2015-03-09 11:19:48 -0600 asked a question efficient cv::inrange for multiple ranges

hello, I want to create a binary mask with a bulk of ranges. (maybe 30 (min, max) - ranges). Is there a efficient way to create such a mask?

2015-02-20 17:37:35 -0600 received badge  Popular Question (source)
2014-12-09 13:44:19 -0600 marked best answer How to use CascadeClassifier with a mask

Hi, i want to speed up my Object-detection. The idea is that the algorithm only search in the region of the mask. Is there a simple solution to realize this? for example the mask look loke this:
Uploaded with ImageShack.us

i can use findContour, but i think thats not effectiv by masks with a wide spread.

greetings

2014-12-09 13:05:53 -0600 marked best answer how to estimate the (weber) contrast of an image?

Hi, can someone help me to calculate the contrast of an luminance-image? I've already implement a method to calculate the contrast of color and a approach for the luminance- contrast. I think the weber-contrast is a good solution. Isn't it?

The formula i found on Wikipedia: weber contrast there I representing the luminance of the features and I_b the background luminance.

For my implementation i use JavaCV. The code is:

public double analyse(CvMat input) {
    double contrast = 0;

    // convert to lab to extract luminance channel

    cvCvtColor(input, input, CV_BGR2Lab);

    CvMat background = cvCreateMat(input.rows(), input.cols(), CV_8UC1);
    cvSplit(input, background, null, null, null);

    //calc local background
    cvSmooth(background, background, CV_BLUR, 5);
    JavaCVUtil.showImage(background.asIplImage(), "");
    int width = input.cols();
    int height = input.rows();



    for (int y = 0; y < height; y++) {

        for (int x = 0; x < width; x++) {
            contrast += (input.get(y, x, 0) - background.get(y, x))
                    / background.get(y, x);

        }
    }
     //normalize
    contrast /= (height * width);
    return contrast

}

Maybe someone can say me what's wrong with this code. For example, for the following image i get a NaN Error: image description

greetings

2014-09-03 05:19:51 -0600 marked best answer how to sum a 3 channel matrix to a one channel matrix?

Hi, i want to sum a 3 channel (lab) matrix to a one channel matrix. Is there a simple way to do this or must i split the image into 3 different CvMat-Objects?

It would to be nice, if there is a parameter for cvCvtColor that add all 3 channels with the same weight.

greetings

2012-11-20 06:25:11 -0600 asked a question How to cluster a 3D-Histogram?

Hi, i want to cluster a 3D-Histogram with kmeans. Can someone tell me how to prepare the bins for kmeans2?

greetings

2012-11-12 06:05:53 -0600 asked a question How to implement a Color-Dodge-Blend Algorithm

Hi, i want to implement a dodge-blend with this formular: ((B == 255) ? B:min(255, ((A << 8 ) / (255 - B)))))

is there a way to build this with the performed Methods (like cvMin,cvSubRS...)? I have some problems with the shifting and the B==255

greetings

2012-10-21 14:01:04 -0600 commented answer How to use CascadeClassifier with a mask

thanks for your answers. My problem is that i have some images with high quality(>8MP). These image have smal faces (50x50px) that i want detect. My idea is to set a binary mask that based on the skincolor and run the facedetector over the mask. In time i use cvFindContour() and run haarcascade over roi.