Skip to content

Draw contours in color #7

Open
Open

Description

@cesine
No description provided.

Activity

  1. cesine commented on Mar 9, 2012

    @cesine
    OwnerAuthor

    Step 1: You can get some contours by applying a threshold on the image (see code in jni/image_processing.cpp)

    vector<vector > contours;
    findContours(thresh, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);//###

    Step 2: Draw your contours

    /*

    • Draw the checkbox-like contours which were found in green Scalar(0, 255, 0, 255) so you can see what the function is doing...
      */
      drawContours(mbgra, contours, -1, Scalar(0, 255, 0, 255), 2);

    For more details on what the parameters are for the drawContours function, see the friendly OpenCV docs:
    http://opencv.itseez.com/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=drawcontours#cv.DrawContours

  2. reopened this on Sep 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions