Ask Your Question

ggrayce's profile - activity

2018-08-14 19:42:37 -0600 received badge  Enthusiast
2018-08-08 13:09:19 -0600 commented question How to crop the image as wide as possible?

link text the exemple of the step 7b.

2018-08-08 13:04:58 -0600 commented question How to crop the image as wide as possible?

Yes, I'm using outlines. What I thought and was trying to do was: 1)I open the image. 2)I use the "canny" function to ge

2018-08-08 13:02:55 -0600 commented question How to crop the image as wide as possible?

Yes, I'm using outlines. What I thought and was trying to do was: I open the image. I use the canny function to get the

2018-08-08 12:41:23 -0600 commented question How to crop the image as wide as possible?

Yes, that's what I want. But I do not know how. I have already found this boungingBox function but I do not know how to

2018-08-08 11:38:55 -0600 asked a question How to crop the image as wide as possible?

How to crop the image as wide as possible? I want to be able to crop any image with the smallest bounding box possible.

2018-08-08 09:02:50 -0600 marked best answer How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

I have a binarized image by Otsu Threshold. I'm new in C++ and Opencv. I try this, but don't work.

      #include <iostream>
    #include "opencv2/imgproc/imgproc.hpp"
   #include "opencv2/highgui/highgui.hpp"
   #include <stdlib.h>
   #include <stdio.h>

using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
    cv::Mat img = cv::imread("melanoma_abertura_cortada_NAOINVERT.png");

    if (img.empty())
    {
        std::cout << "!!! imread() failed to open target image" << std::endl;
        return -1;
    }
    cv::Mat img_canny;

    vector<vector<Point> > contours;
    vector<Vec4i> hierarchy;

    Canny(img, img_canny, 80, 20);


    findContours(img_canny, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_NONE, Point(0, 0));

// Get the moments
    vector<Moments> mu(contours.size());
    for (int i = 0; i < contours.size(); i++)
    {
        mu[i] = moments(contours[i], false);
    }

    ///  Get the mass centers:
    vector<Point2f> mc(contours.size());
    for (int i = 0; i < contours.size(); i++)
    {
        mc[i] = Point2d(mu[i].m10 / mu[i].m00, mu[i].m01 / mu[i].m00);


    }

    for (size_t cC = 0; cC < contours.size(); ++cC)  
        for (size_t cP = 0; cP < contours[cC].size(); cP++)
        {
            Point currentContourPixel = contours[cC][cP];
        }

        Mat  magnitudee;

        magnitude(mc, contours.size(), magnitudee);

    cv::waitKey(0);
    return 0;
}
2018-08-08 08:00:58 -0600 commented answer How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

Shows an erro when i compile: OpenCV Error: Assertion failed (src1.size() == src2.size() && type == src2.type()

2018-08-07 20:34:44 -0600 commented answer How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

If yes, when i try shows an erro in oparetor "norm" and yours arguments.

2018-08-07 20:17:26 -0600 answered a question How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

I wuld replace this part: for (size_t cC = 0; cC < contours.size(); ++cC) for (size_t cP = 0; cP < cont

2018-08-07 20:11:05 -0600 asked a question How to divide an image horizontally into two equal parts.

How to divide an image horizontally into two equal parts. I try this, but i don't now how i show the result. i don't now

2018-08-06 10:05:45 -0600 edited question How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

How do I find a distance between the contour pixels of an irregular image and the center of mass of that image? I have a

2018-08-06 10:05:20 -0600 received badge  Editor (source)
2018-08-06 10:05:20 -0600 edited question How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

How do I find a distance between the contour pixels of an irregular image and the center of mass of that image? I have a

2018-08-05 12:04:29 -0600 commented question How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

How would I do that? I'm starting in C ++ and I'm having difficulty creating my own program. If you could help me by sho

2018-08-05 11:52:39 -0600 commented question How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

In the case, it would just be the outline of an irregular shape. Thanks.

2018-08-05 10:47:26 -0600 asked a question How do I find a distance between the contour pixels of an irregular image and the center of mass of that image?

How do I find a distance between the contour pixels of an irregular image and the center of mass of that image? I have a

2018-08-05 01:07:40 -0600 commented question have a data of melanoma images,I need to extract the following features from them : 1-Asymmetry feature 2-Color variation feature 3-Border feature 4-Diameter feature To use them in the ABCD rule for melanoma detection

Did you make it? If yes, plis post, will help me a lot! Thanks