Go to Post So we get to hear the likes of Copioli, Baker and Patton yuk it up? This should be good. - Ricky Q. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 20-01-2013, 14:29
Gmercer Gmercer is offline
Registered User
None #1631
 
Join Date: Jan 2013
Location: Las Vegas
Posts: 15
Gmercer is an unknown quantity at this point
Finding the HSL Threshold for my reflective tape

Im currently progrmming an AxisCamera to pick up reflective tape and crop rectangle around the tape. i have most of the code down except for the parameters of the HSL Threshold, here is what i have:

Code:
public void cameraCapture() throws AxisCameraException, NIVisionException {
        if (joy1.getRawButton(3)) {
            ColorImage initImg;
            BinaryImage dataImg;
            ParticleAnalysisReport[] particle;
            int trgCnt;
            SmartDashboard.putString("Taken Picture", "Picture begun...");
            if(camera.freshImage()) {
                initImg = camera.getImage();

                //RIGHT HERE
                dataImg = initImg.thresholdHSL(0, 0, 0, 0, 0, 0);   //set threshold to bright colors(UNFINISHED)
                //No clue how to find these parameters

                dataImg = dataImg.removeSmallObjects(false, 1);     //remove small pixles from image
                dataImg = dataImg.convexHull(false);                //fill in rectangles selected
                dataImg = dataImg.particleFilter(critCollection);   //filter rectangles
                trgCnt = dataImg.getNumberParticles();
                if(trgCnt > 0) {
                    particle = dataImg.getOrderedParticleAnalysisReports();
                    SmartDashboard.putString("Taken Picture", "binary mapping finished....calling Aim");
                    Aim(particle);
                } else {
                    SmartDashboard.putString("Taken Picture", "No particles to manipulate, picture was not taken?");
                }
                dataImg.free();
                initImg.free(); 
            }
        }
    }
i don't know how to find the values. The function requires:

int hueLow
int hueHigh
int saturationLow
int saturationHigh
int luminenceLow
int luminenceHigh

I was told the NI tool "Particle Classification Training" would help, but i am not sure how to go about finding these limits of an image, how can i attain these values? Example image that i would use(im looking for the green boarder):

Last edited by Gmercer : 20-01-2013 at 14:34.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi