Ask Your Question

Petyu's profile - activity

2019-07-18 09:12:42 -0600 received badge  Popular Question (source)
2018-01-01 10:44:59 -0600 commented question Background removal improvement

Thanks for your comment. The background subtraction is a really good idea. I can create two images with bees and without

2017-12-28 08:24:27 -0600 asked a question Background removal improvement

Background removal improvement I would like to remove the background of bees to be able to do further analyses with them

2017-07-19 12:40:33 -0600 commented question Classifier proof of concept

The mite's width/height is 10 pixels. I'm wondering to move closer the camera and take more pictures from the honeycomb.

2017-07-17 08:24:40 -0600 asked a question Classifier proof of concept

I'm working on a mite infection detection program of honey bees. A mites are on the top of honey bees and has a significant different color from bees. I'm using

inRange(hsv_image, Scalar(hMinSpinBox->value(), sMinSpinBox->value(), vMinSpinBox->value()), Scalar(hMaxSpinBox->value(), sMaxSpinBox->value(), vMaxSpinBox->value()), imgThresholded);

where hsv min max parameters are specified by color histogram of sample mites. The current approach works well but have some false positive hits too. (not the top of bees but honey comb)

image description

I wonder if I could find the bees one-by-one by a trained classifier I could reduce the number of false positive cases.

If you have experience with opencv classifier could you please advice would it be feasible?

I would really appreciate any suggestions.

2016-02-13 13:39:44 -0600 received badge  Student (source)
2016-02-11 06:25:50 -0600 received badge  Enthusiast
2016-02-04 06:33:25 -0600 received badge  Supporter (source)
2015-11-09 02:28:49 -0600 commented answer Cell detection improvement

Thanks for your great answer. I'm going to use your suggestions. (Light, background)

2015-11-09 02:26:10 -0600 commented answer Cell detection improvement

Thanks for your awesome solution!

2015-11-09 02:24:08 -0600 received badge  Scholar (source)
2015-11-06 05:38:49 -0600 asked a question Cell detection improvement

I would create a small application which counts the number of cells of a honey comb. (I'll count the number of covered and uncovered cells based on theirs color in the next step ...)

Most on uncovered cells are found but the covered and those which contains honey are still missing.

I would really appreciate if someone could help me how to improve my current contour detection solution. Any ideas, suggestions are welcomed.

This the input image: C:\fakepath\IMG_20150825_133836.jpg image description

Here is my code:

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

using namespace cv;
using namespace std;

int main(int /*argc*/, char** /*argv*/)
{
    Mat src; Mat src_gray; Mat canny_output;
    int thresh = 30;
    vector<vector<Point> > contours;
    vector<Vec4i> hierarchy;

    src = imread("IMG_20150825_133836.jpg", 1);

    cvtColor(src, src_gray, CV_BGR2GRAY);
    blur(src_gray, src_gray, Size(3, 3));
    Canny(src_gray, canny_output, thresh, thresh * 2, 3);
    /// Find contours
    findContours(canny_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0));
    /// Draw contours
    Mat drawing = Mat::zeros(canny_output.size(), CV_8UC3);
    for (int i = 0; i< contours.size(); i++)
    {
        if (contourArea(contours[i]) > 100) {       //filter noise
            drawContours(drawing, contours, i, Scalar(255, 255, 255), -1, 8, hierarchy, 0, Point());
        }
    }
    namedWindow("Comb", CV_WINDOW_AUTOSIZE);
    imshow("Comb", drawing);
    waitKey(0);
    return(0);
}

The current output is: image description