ImaqLearnP​attern

Hi. I am trying to select a part of an image ( video ) and display it a new window in order to search it in video image.
After i open the camera a new window pops up to see the video image than i choose a part of it with toolbox than a new window pops up but instead of the part of the image i see green image at the size of the part that i chose.
/* Create images that will be used within this program */
            searchImage = imaqCreateImage (IMAQ_IMAGE_RGB, 2);
            templateImage = imaqCreateImage (IMAQ_IMAGE_RGB, 2);
                                                  ​                                etc. etc. etc. etc.
            switch (event)
                        case IMAQ_DRAW_EVENT:
                                    userRect = rect;
                                    imaqSetImageSize(templateImage, userRect.width, userRect.height);
                                    imaqCopyRect (templateImage, searchImage, userRect,
                                                  ​                        imaqMakePoint(0,0));
                                    imaqMoveWindow (1, MakePoint(410,350));
                                    imaqDisplayImage (templateImage, 1, 1);
                                    break;
 Please help.
Thanks

Hello ReuvenGershon,
Thanks for the additional information.  Try investigating your palette type and make sure it is set to the one you want (whether it is binary, grayscale, etc..).  Also, make sure that you are using a consistent image type.  Obviously, strange things can happen if a RGB, U8, or U16 image is displayed as another type.
Also, I noticed that there is a duplicate discussion forum thread in which you're discussing this identical problem with a colleague of mine.  I've spoken with David and we agreed that in order to simplify our communication we'd keep our communication with you limited to this thread.
Michael B.
Applications Engineer

Similar Messages

  • How can I use find coordsys(p​attern)2 to locate for template in an image when the image is threshold-​ed?

    I'm trying to locate for a template in an image, and the image is threshold-ed. I tried to threshold both the template and the image to try if it can locate the template, but there was an error, it said that the template has not enough contrast or something like that? Please help me, thank you.

    Here is what I tried to do, I used a AutoBthreshold2 and I didn't set a value to it. The image is attached below and the template. Thank you.
    Here is the error.
    Attachments:
    pattern.vi ‏51 KB
    template.jpg ‏1 KB
    bb.jpg ‏350 KB

  • I want to remove bind variables in my data like & and many

    I have a field that holds description of a code and this is having bind variables (special characters). I need to remove them and replace with no value.
    I was trying with following sql and the dialog box (Enter Substitution Variable)is opening when I tried to execute the sql.
    select regexp_replace('B VOC AC & HEATING (*[[:punct:]])', '') from dual;
    please provide me the SQL how to do this
    Thanks in advance

    Hi,
    It looks like your question is about Substitution Variables, that typically look like &start_date or &1.  Bind Variables are completely different.
    By default, SQL*Plus, and some other front ends, expect that & will be followed by a substitution variable name.  If you're not using substitution variables, and you want to treat & as a normal character, then use Pablolee's suggestion.  SET DEFINE OFF will make SQL*Plus treat & as a normal character until you end the SQL*Plus session, or you explicitly cancel it by saying SET DEFINE ON.
    By the way, did you mean to call REGEXP_REPLACE with 2 arguments, like you posted
    select regexp_replace('B VOC AC & HEATING (*[[:punct:]])', '') from dual;
    or with 3 arguments, something like this
    select  regexp_replace ( 'B VOC AC & HEATING'
                           , '(*[[:punct:]])'    -- Round parentheses, '(' and ')', are not doing anything in this case
                           , ''                  -- NULL might be clearer
    from    dual;
    ?  Also, '*' in a regular expression p
    attern, means "the last item can occur 0 or more times".  In your code, there isn't any "last item" before the '*',  What are you trying to do?  Post some sample data (CREATE TABLE and INSERT statements) for a few different sample cases, and the results you want from that sample data.
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Unable to get files using BatchSFTP

    Hi,
    Im using BatchSFTP eway to get files from an sFTP server.
    BatchSFTP_1.getClient().disconnect();
    BatchSFTP_1.getConfiguration().setSSHServer( hostName );
    BatchSFTP_1.getConfiguration().setSSHPort( 22 );
    BatchSFTP_1.getConfiguration().setSSHUser( userName );
    BatchSFTP_1.getConfiguration().setSSHPassword( password );
    BatchSFTP_1.getConfiguration().setRemoteDirectory( remotePath );
    BatchSFTP_1.getConfiguration().setRemoteDirectoryNa meIsPattern( false );
    BatchSFTP_1.getConfiguration().setRemoteFile( ".*\\.csv$" );
    BatchSFTP_1.getConfiguration().setRemoteFileNameIsP attern( true );
    BatchSFTP_1.getClient().connect();
    BatchSFTP_1.getClient().get();
    BatchLocalFile_1.getClient().setPayload( BatchSFTP_1.getClient().getPayload() );
    BatchLocalFile_1.getClient().put();
    and im getting a _"Batch SFTP eWay error when doing data transfer operation in [get()], message=[Operation unsupported].|#] " _
    How do I fix this?
    Also, is there a way for me to handle cases wherein there are no existing files in the directory? In BatchFTP, there is a getIfExist() method but not available for Batch SFTP.
    Thanks!

    Hi,
    I am not sure why u r getting the error, but for the 2nd part
    "Also, is there a way for me to handle cases wherein there are no existing files in the directory? In BatchFTP, there is a getIfExist() method but not available for Batch SFTP."
    Get all the files in ur directory and then execute a loop for each file and do ur processing... in case there is no file in the directory the loop won't execute..

  • Too many points in Path?

    Sometimes I receive the message when exporting FHMX file to
    PDF file, as follows:
    "The document could not exactly reproduced
    because it contains Custom or Postscript fills or
    strokes, EPS files, pages larger than 45", or paths
    with more than 5,000 points."
    I am not sure what it means. Can anyone advise how to solve
    the above message? Thanks.

    > Sometimes I receive the message when exporting FHMX file
    to PDF file, =
    as
    > follows:
    > "The document could not exactly reproduced
    > because it contains Custom or Postscript fills or
    > strokes, EPS files, pages larger than 45", or paths
    > with more than 5,000 points."
    >
    > I am not sure what it means. Can anyone advise how to
    solve the above=
    message?
    > Thanks.
    First of all PDF Export in FreeHand is inadequate and
    unreliable and PDf=
    files for production should be created with Acrobat
    distiller.
    Do yoy have any of these in the document.
    Custom & Postscript fill =3D a fill described in
    PostScript language whi=
    ch will be calculated on output. Not visible in freehand,
    only C or PS p=
    attern appear in object. Usually these do not work well and a
    pattern fi=
    ll is often a better choice.
    EPS file =3D Imported EPS image, bitmap or outline.
    Pages larger than 45" =3D Self-evident
    Parth with 5000 points =3D Autotracing often create objets
    with thousand=
    s of points. Simplify tool in Xtras > Cleanup can reduce
    points without =
    significan loss of quality.
    So you probably have an object that cannot be exported.
    Halving is a goo=
    d way to track it down. It goes like this. !!!!Make a Backup
    copy of the=
    original file first!!!! Then delete (or move to invisible
    layer) half o=
    f the objets on the page or half of the pages. Then export.
    If the error=
    apperas again you have the problem objet left, if not it is
    in the dele=
    ted half. Continue halving until you have the problem object
    left.
    Jukka

  • Problem with statement like

    Dear all
    when I do a select I can work with the statement like
    CONCATENATE WA_DEL-FIELD '%' INTO I_FIELD.
          SELECT * FROM ZTABLE INTO TABLE IT_ITAB
            WHERE FIELD LIKE I_FIELD.
    how do I can do the same question for a if command for a field ?
    I was thinking with the statement (FIELD = ABCDEFG) (I_FIELD-SIGN = I / I_FIELD-OPTION = 'EQ'  / I_FIELD-LOW = 'ABC*'
    IF FIELD IN I_FIELD
    should work, but it was not working.....  what do I need to do

    Hello,
    Silly mistake ... You have to use the OPTION as CP ( C ontains P attern ) instead of EQ
    (I_FIELD-SIGN = I / I_FIELD-OPTION = 'CP' / I_FIELD-LOW = 'ABC*'
    BR,
    Suhas

  • Array of strings to multiple string controls

    I'm parsing a query response from a noise generator - it comes back as "1234,2345,3456,4567,5678,6789,7890,8901,9012,0123".  Basically, one long string of 10 4-digit values, comma separated, is returned.  Using the string Match attern (in a loop) I've parsed the large string into an array of 10 4-digit strings without commas.  Now, I have 10 indicators (each representing one of the 10 values) that I want this info to go into.  I could (one-by-one) stuff the array information into each of these indicators.  However, I'm wondering if there is a loop-ish approach where maybe all the indicators get grouped into a cluster and the cluster order is the iterator that indexes into the source array. 
    Any suggestions?

    Maybe you can just use a plain array indicator directly. Anything wrong with that? It reduces diagram clutter! You can always add free text labels outside as fake element labels.
    If your indicators are scattered all over the front panel, use a single "index array", resized to 10 elements.
    The attached example (LabVIEW 8.0) shows both ways.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    StringParsing.vi ‏16 KB

Maybe you are looking for