Go to Post If I was making this I would want to not have to use anything smaller than a 3/16" end mill, but 1/8" would be acceptable. Anything smaller and I'd tell the designer to go play in traffic. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-09-2014, 03:03 PM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Vision Targeting: Dilate

Is there an equivalent of the openCv structure element "dilate" in Java's version of NIVision?
Reply With Quote
  #2   Spotlight this post!  
Unread 03-10-2014, 09:02 PM
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Vision Targeting: Dilate

The Dilate is an input to Morphology function.

Specifically, the imaqMorphology function or the imaqGrayMorphology function if the image is still grayscale will take in a method that can be dilate.

I don't know if that is wrapped for Java.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 03-15-2014, 01:08 PM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Vision Targeting: Dilate

Anyone? We need it to detect hot goals

E/ i found this in NIVision.java

Code:
    //============================================================================
    //  Morphology functions
    //============================================================================
    //IMAQ_FUNC int IMAQ_STDCALL imaqGrayMorphology(Image* dest, Image* source, MorphologyMethod method, const StructuringElement* structuringElement);
E/ can anyone post the list of constants for MorphologyMethod and StructuringElement? if I'm rewrapping the entire NIVision library might as well throw in erode as well


I'm going to see if i can rewrap this

E/ my copy of windriver has no license -_-

E/ found them here http://zone.ni.com/reference/en-XX/h...raymorphology/

E/ for open sourcing purposes, here is NIVision.dilate(). If anyone knows how to remove the while loop and convert the 0 into a [count][count], LMK. If you want to use this, you have to rebuild the wpi libraries and add this in image/NIVision.java

Code:
    private static final int FN_DILATE = 2;
    
    private static final BlockingFunction imaqGrayMorphologyFn = NativeLibrary.getDefaultInstance().getBlockingFunction("imaqGrayMorphology");
    static { imaqGrayMorphologyFn.setTaskExecutor(taskExecutor); }
    
    public static void dilate(Pointer dest, Pointer source, int count) throws NIVisionException {
        assertCleanStatus(imaqGrayMorphologyFn.call4(dest.address().toUWord().toPrimitive(),
                                                source.address().toUWord().toPrimitive(),
                                                FN_DILATE,
                                                0));
        if(--count > 0){
            while(count --> 0){
                assertCleanStatus(imaqGrayMorphologyFn.call4(dest.address().toUWord().toPrimitive(),
                                                        dest.address().toUWord().toPrimitive(),
                                                        FN_DILATE,
                                                        0));
            }
        }
    }

Last edited by Arhowk : 03-15-2014 at 07:44 PM.
Reply With Quote
Reply


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 09:02 AM.

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