Ask Your Question

Matthijn Dijkstra's profile - activity

2018-05-18 20:06:57 -0500 received badge  Popular Question (source)
2015-08-02 21:53:42 -0500 received badge  Nice Question (source)
2014-04-01 03:50:33 -0500 received badge  Student (source)
2014-02-03 07:58:21 -0500 asked a question Detecting color range from "avarage"

Currently I am using a HaarCascade to detect a face in a picture. Which is working, I am getting a rect of where the face is.

Now I want to get the "average?" (skin color) in that rect. And use that as a base for the color range to search for other skin in the photo. How should I go about that?

I have found the inRange function, which searches for a color in a range. But I am not quite sure how I could get the average color of my skin in there. It seems that the inRange function needs HSV values? However, I don't know quite what that format is. It doesn't seem to be the same as HSB in photoshop. (Which I tried for "testing purposes").

My question boils down to this, how can I get the "average" color in a rect, and find other colours in that range (e.g, lighter and darker than that color, but the same shade).

Thanks.

2014-02-03 07:53:16 -0500 commented question OpenCV on OSX Mavericks in Xcode

I have no experience with CMake. I found somewhere that I needed it so I did. But that would be a handy feature. However it seem's i've got it working. I had to add the library search path.

2014-02-01 09:54:28 -0500 asked a question OpenCV on OSX Mavericks in Xcode

I'm trying to run OpenCV on OSX in Xcode. I have downloaded the code from github. And used cmake to compile it.

Next I created a new Xcode project with the following code:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
    if( argc != 2)
    {
        cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
        return -1;
    }

    Mat image;
    image = imread("img.jpg");   // Read the file

    if(! image.data )                              // Check for invalid input
    {
        cout <<  "Could not open or find the image" << std::endl ;
        return -1;
    }

    namedWindow( "Display window", WINDOW_AUTOSIZE );// Create a window for display.
    imshow( "Display window", image );                   // Show our image inside it.

    waitKey(0);                                          // Wait for a keystroke in the window

    return 0;
}

Next I've set the header search path to: /usr/local/include

After that I've added the libraries from /usr/local/lib in the "Build Phases" as seen in the screenshot below.

image description

However, when I try to run I get the following error:

ld: library not found for -lopencv_core.3.0.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Did I mis something?

edit:

Looks like i've got to add the library search path too. Now it compiles (doesn't show anything, but it compiles).

2014-01-25 08:27:50 -0500 received badge  Editor (source)
2014-01-25 08:27:34 -0500 asked a question Track position hands iOS.

Well, the title gives the question away. I am trying to track the hand through the camera on iOS. I have been googling and testing around. And I have found that I could use OpenCV for this.

I have OpenCV working (as in, I can capture video from the camera, and display it on my iPhone as wel as blurring / grayscaling the image in the

- (void)processImage:(Mat&)image

delegate method (which is C++, not my strongest point). However, I have no clue how to continue now. I am only trying to track the position of my hands. I don't have to have an exact outline, gestures, or finger recognition.

But I have no idea how to go about this. Any help is appreciated.