Ask Your Question

Tarcisioflima's profile - activity

2020-04-30 08:17:41 -0600 received badge  Popular Question (source)
2020-02-11 11:59:26 -0600 asked a question Converting Mat to one dimensional float array for EM?

Converting Mat to one dimensional float array for EM? I'm trying to convert a Python code to Java. However, I'm unable t

2020-02-11 11:44:54 -0600 commented answer Expectation Maximization Prediction Issues

Did you published the paper?

2020-02-11 11:44:38 -0600 commented answer Expectation Maximization Prediction Issues

did you published the paper?

2019-12-09 05:15:06 -0600 commented answer How to remove shadows from foreground after segmentation?

Thank you Greydel. I will take a look on your approach

2019-12-08 07:38:12 -0600 commented answer How to remove shadows from foreground after segmentation?

Thank you Greydel. I will first try to use finding blobs, I just need to figure out about it

2019-12-05 08:21:01 -0600 asked a question How to remove shadows from foreground after segmentation?

How to remove shadows from foreground after segmentation? I am developing an algorithm in Python, which is supposed to i

2018-12-13 10:03:11 -0600 commented answer Expectation Maximization Prediction Issues

I'm not using RGB, I was already using just S and V form HSV to train it. I will take a look on Lab color! Thank you

2018-12-12 18:04:39 -0600 commented answer Expectation Maximization Prediction Issues

Lightning invariant model? Do you have anything about it?

2018-12-10 16:51:35 -0600 commented answer Expectation Maximization Prediction Issues

Kbarni, did you face shadows on your paper? I'm trying to find a way to avoid them

2018-12-09 16:26:12 -0600 commented answer Expectation Maximization Prediction Issues

@kbarni Well, I'm not sure about it as I'm retraining it every time. Also, shadows are an issue here.

2018-12-09 07:46:01 -0600 asked a question Expectation Maximization Prediction Issues

Expectation Maximization Prediction Issues I was trying to segment a leaf from the background to be able to identify the

2018-07-04 09:36:20 -0600 commented answer Detection of stones (rocks) on field surface

@StevenPuttemans I tried some shadow removal technique, but without success.

2018-06-25 15:57:47 -0600 edited question Detection of leaf on unpredictable background

Detection of leaf on unpredictable background A project I have been working about for some time is a unsupervised leaf s

2018-06-25 15:57:23 -0600 edited question Detection of leaf on unpredictable background

Detection of leaf on unpredictable background A project I have been working about for some time is a unsupervised leaf s

2018-06-25 15:55:06 -0600 edited question Detection of leaf on unpredictable background

Detection of leaf on unpredictable background A project I have been working about for some time is a unsupervised leaf s

2018-06-25 15:53:43 -0600 asked a question Detection of leaf on unpredictable background

Detection of leaf on unpredictable background A project I have been working about for some time is a unsupervised leaf s

2018-06-25 11:01:57 -0600 commented answer Detection of stones (rocks) on field surface

@pklab do you think it can lead with shadows in leaf segmentation?

2018-06-22 10:20:00 -0600 marked best answer How to clip an image by extreme points?

Hello, I have found the contours of the object in the image with a cv2.findContours and I want to clip the image in the extreme points. However, the image returned is not correct.

Below is the code, I have implemented. Any hint?

def clipping_image( image ):
    '''
    Clip segmented imaged based on the contours of the leaf
    '''
    image = cv2.cvtColor( image, cv2.COLOR_BGR2GRAY );
    segmented, contours, hierarchy = cv2.findContours(image, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
    cnt = contours[0]
    xmin = min(tuple(cnt[cnt[:, :, 0].argmin()][0]))
    ymin = min(tuple(cnt[cnt[:, :, 1].argmin()][0]))
    xmax = max(tuple(cnt[cnt[:, :, 0].argmax()][0]))
    ymax = max(tuple(cnt[cnt[:, :, 1].argmax()][0]))

    clipped = segmented[xmin:xmax, ymin:ymax]

    return clipped

Thank you

2018-05-29 00:19:48 -0600 received badge  Student (source)
2018-05-28 16:03:31 -0600 edited question Leaf Segmentation using EM

Object Segmentation I begin to develop an algorithm, which has the purpose to identify the area of the leaf that contain

2018-05-28 16:03:16 -0600 edited question Leaf Segmentation using EM

Expectation Maximization OpenCV I begin to develop an algorithm, which has the purpose to identify the area of the leaf

2018-05-28 15:00:56 -0600 edited question Leaf Segmentation using EM

Expectation Maximization OpenCV I begin to develop an algorithm, which has the purpose to identify the area of the leaf

2018-05-28 15:00:24 -0600 asked a question Leaf Segmentation using EM

Expectation Maximization OpenCV I begin to develop an algorithm, which has the purpose to identify the area of the leaf

2018-05-25 11:19:58 -0600 commented question Imread wrong output

Thank you, berak! It works when changing to: images = [cv2.cvtColor(cv2.imread( filename ), cv2.COLOR_BGR2RGB),image]

2018-05-25 11:12:23 -0600 edited question Imread wrong output

Imread wrong output Hi, I'm trying to output one image by using plot; however, it is showing wrong colors as you can see

2018-05-25 11:03:09 -0600 asked a question Imread wrong output

Imread wrong output Hi, I'm trying to output one image by using plot; however, it is showing wrong colors as you can see

2018-03-17 00:28:53 -0600 commented question Coverting C++ to Python

I have build some code in python from that code. However, the results are not the same

2018-03-15 21:58:52 -0600 asked a question Coverting C++ to Python

Coverting C++ to Python I have the following OpenCV code in c++ and I would like to convert it to python. Do any of you

2018-03-15 21:52:30 -0600 commented question Removal Greenish Shadows from Background

Expectation Maximization is founding it on the background!

2017-12-05 10:53:04 -0600 commented question How to avoid compreesion artifacts on segmentation?

@sjhalayka I cannot control it.

2017-12-05 06:12:08 -0600 asked a question Removal Greenish Shadows from Background

Removal Greenish Shadows from Background I have an image of a leaf on a poorly white screen and need to find out just th

2017-12-04 12:51:57 -0600 marked best answer How to avoid compreesion artifacts on segmentation?

I am using OpenCV EM to segment a image on the HSV domain. Therefore, the segmentation detect some false positives [Highlights in Yellow]. Below, you can see.

Example

Therefore, I tried to use threshold to remove them without success as showing in the described attachment. I got the better result with THRESH_TOZERO_INV; however, I lost part of the leaf.

image description

Any help on how to keep only the Leaf without false positives?

2017-12-04 12:51:52 -0600 commented answer How to avoid compreesion artifacts on segmentation?

@Kbarnin, I'm trying to use the S and V from HSV domain to train my EM algorithm; however, due to greenish shadows, it i

2017-11-16 06:26:36 -0600 asked a question How to avoid compreesion artifacts on segmentation?

How to avoid compreesion artifacts on segmentation? I am using OpenCV EM to segment a image on the HSV domain. Therefore

2017-11-16 06:18:31 -0600 answered a question How to clip an image by extreme points?

I was able to get the expected results changing my code as below: def clipping_image( image ): ''' Clip segment

2017-11-16 06:16:15 -0600 marked best answer What is the java equivalent?

I'm trying to implement the below piece of code in JAVA; however, I cannot find a replacement for Vec3f. Any hint on it?

Mat samples( img.rows * img.cols, 3, CV_32FC1 );

int index = 0;
for( int y = 0; y < img.rows; y++ ) {
    Vec3f * row = float_img.ptr(y);
    for( int x = 0; x < img.cols; x++ )
        samples.at<Vec3f>(index++, 0) = row[x];
}
return samples;

Thank you!

2017-11-16 06:16:15 -0600 received badge  Scholar (source)
2017-10-02 08:34:03 -0600 asked a question How to clip an image by extreme points?

How to clip an image by extreme points? Hello, I have found the contours of the object in the image with a cv2.findConto

2017-09-29 08:58:33 -0600 received badge  Enthusiast
2017-09-27 08:59:20 -0600 commented question What is the java equivalent?

I added it on the code.

2017-09-27 08:59:01 -0600 edited question What is the java equivalent?

What is the java equivalent? I'm trying to implement the below piece of code in JAVA; however, I cannot find a replaceme

2017-09-27 08:56:07 -0600 received badge  Editor (source)
2017-09-27 08:56:07 -0600 edited question What is the java equivalent?

What is the java equivalent? I'm trying to implement the below piece of code in JAVA; however, I cannot find a replaceme

2017-09-27 08:54:13 -0600 commented question What is the java equivalent?

I'm trying to generate a Mat from my RGB image to train EM algorithm. Thus, it is creating a sample vector.

2017-09-27 08:44:41 -0600 asked a question What is the java equivalent?

What is the java equivalent? I'm trying to implement the below piece of code in JAVA; however, I cannot find a replaceme

2017-08-08 14:54:40 -0600 asked a question Android Opencv EM Fatal Error

I'm trying to use EM::predict2(sample, probs) to predict if a pixel is part of a leaf or not; however, I'm getting the error:

CvException [org.opencv.core.CvException: cv::Exception: /build/master_pack-android/opencv/modules/ml/src/em.cpp:569: error: (-215) sample.size() == Size(means.cols, 1) in function cv::Vec2d cv::ml::EMImpl::computeProbabilities(const cv::Mat&, cv::Mat*, int) const]

When I'm calling:

Mat probs = new Mat(imgHSV.rows(), em.getClustersNumber(), CvType.CV_32FC1);

Mat mPredict = new Mat(1, 2, CvType.CV_8UC1);
mPredict.put(0,0,imgHSV.get(i,j)[1]);
mPredict.put(0,1,imgHSV.get(i,j)[2]);

double[] probabilities = em.predict2(mPredict, probs);

To clarify some points, I'm showing below the pseudocode that I was trying to follow:

stackedPixels ← ∅
for all pixelRow in image do
    for all pixel in pixelRow do
        stackedPixels ← stackedPixels ∪ pixel
    end for
end for
EM ← OpenCV.EM(nClusters = 2, covMatT ype = OpenCV.DIAGONAL)
EM.train(stackedPixels)
return EM


key ← hash(pixel[S], pixel[V])
if hash in pixelDictionary then
    return pixelDictionary[key]
end if
probabilities ← EM.predict(pixel[S], pixel[V])
pixelDict[key] = probabilities[0] > probabilities[1]
return pixelDict[key]