Invalid color template image

I try to do patttern matching using IMAQ Vision. Both source and
template images are .BMP files and are generated in a VB .NET program
through NI Framegrabber. IMAQ Match Color Pattern gives me the
following error message:
Error-1074395384 occurred at IMAQ Match Color Pattern
Invalid color template image
Do I have to use .PNG files when doing pattern matching?
Thanks.

Hey John123,
I was wondering what version of Vision that you are using? Have you tried to run any of the example programs, like the ColorPatternMatching example that can be found in the following directory: C:\Program Files\National Instruments\Vision\Examples\MSVB.NET\2. Functions\Color Pattern Matching. I was able to run this example program by using .BMP images and not PNG images. So to answer your question, you don't have to use PNG files with this function, you can use Bitmap images. You can use any kind of image that have a 32-bit RGB or HSL bit depth.
If you are acquiring from a Framegrabber, I would suggest that you double check and make sure that the images that you are getting from your camera are actually 32-bit, and not 16-bit. Also, you could post a couple of your images on this thread, and I could try them out with an example that uses the IMAQ Match Color Pattern function. Try some other BMP images and do you get the same error? Try the example program, and see if that gives you the error with your images. Let me know if you have any questions. Thanks, and have a great day.
Regards,
DJ L.

Similar Messages

  • "Invalid golden template" error using Vision

    Hello,
    I'm trying to compare two images (to locate a hole that's present in one of them) using the IMAQ Compare Golden Template vi, and I'm getting the following error:  "Error - 1074395770 occurred at IMAQ Compare Golden Template", "Invalid golden template."  I've included a copy of my vi and a screen snapshot of the error.
    Can you help me with this?  I am relatively new to Labview, so there may be a simple solution to this.
    Thanks,
    Doug D.
    Attachments:
    files.zip ‏61 KB

    cb,
    Thanks for the tip about the "Golden Template Inspection Example.vi"; that was helpful.
    Yes, I'm still getting the same error.  It looks like the problem is with my template file.  Basically I just converted a .jpg file (attached) to .png.  But it seems that the "IMAQ Match Pattern 2" and "IMAQ Compare Golden Template" VIs both require a template image with pattern matching info in it, and I can't create one that works using the "IMAQ Setup Learn Pattern 2" and "IMAQ Setup Learn Pattern 2" VIs.
    Does anyone have information or an example on how to create a template file for the "Golden Template Inspection Example VI?
    Doug
    Attachments:
    No_hole.jpg ‏394 KB

  • Using non-square template images

    Is there any possibility of using non-square templates in IMAQ Match Color Pattern? For example, I need to find predefined circle in the image, but in case of using it as a template, it will be surrounded with zero pixels. Would it influence on searching results?

    To do color pattern matching, you will always have a rectangular template image.  Depending on your application you may want to try doing geometric matching to limit your image to only that portion that you are wanting to search through.
    Regards,
    Jasper S

  • Pages 08 Template images -where are they saved?

    I know Pages 08 does not have clip art but I like many of the pictures on the templates. I want to use some of the template images (like the cat.tiff or frog.tiff) on a blank document. Copying & pasting works but I'd rather be able to see all the template tiffs at once. Where are the template images(tiffs) located on my hard drive. Is there a specific iWork folder I can find them in?

    Welcome to Apple Discussions
    The images are "buried" in each template which is buried in the Pages application. You can find them by Control- or right-clicking on the Pages application > Show package contents > Contents > Resources > Templates & then the folder for the template category you want. Then Control- or right-clicking on the template icon > Show package contents > Contents where you will find the actual images.
    Or you can just copy & paste from an open template.

  • How to create 2-color Pantone image from jpeg logo

    Working in CS3 under XP, I need to convert a jpeg rvb image of a logo  into a 2-color pantone image to import it into an Illustrator file. I  can isolate the logo's two distinct colors using the select wand and  then tried filling the selections with the closest Pantone colors, but  the rvb layers still seem to exist. I have saved in .eps DCS2, but the  imported colors when sampled in Illustrator are still rvb/cmyk. Is there  a way to isolate the shapes/colors and then transfer them as vector  images into Illustrator, where I could fill them with the Pantone  colors? Or a simpler way not necessarily using Photoshop? Thanks very much!

    Is this a vector image or pixels? EPS can be both.
    Better than selecting it with automatic functions like magic wand is to draw it manually in Illustrator. If it already is vector (like shape layers), then you can just copy the paths from Photoshop and paste into Illustrator.

  • Cannot view a PDF in IE on Windows XP - "Invalid Color Space"

    I am trying to provide a link to a PDF for online viewing:
    http://glencoe.com/sites/common_assets/mathematics/007891647x/LP/FL5MINC3_7_2c_892770_se.p df
    Some users can see the PDF with no issue, other users with Acrobat reader 9 on Windows XP receive this error: "Invalid Color Space."
    Does anyone know why I'm getting this error, or more importantly, how to fix it?
    Thanks,
    Rob Underwood

    What's the word on this?  I am still having the same issue.  This is very problematic for many pdfs on many websites! Can someone from Adobe please answer this???

  • Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution)   Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV

    Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution)   Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV

    You're welcome, and thank you for the reply.
    2) Yesterday I made the subclips with the In-Out Points and Command-U, the benefit is that I've seen the clip before naming it. Now I'm using markers, it's benefit is that I can write comment and (the later) clip name at once, the drawback is that I have to view to the next shot's beginning before knowing what the shot contains.
    But now I found out that I can reconnect my clips independently to the format I converted the master clip to. I reconnected the media to the original AVI file and it worked, too! The more I work with, the more I'm sold on it... - although it doesn't seem to be able to read and use the date information within the DV AVI.
    1) Ok, I tried something similar within FCE. Just worked, but the file size still remains. Which codec settings should I use? Is the export to DV in MOV with a quality of 75% acceptable for both file size and quality? Or would be encoding as H.264 with best quality an option for archiving, knowing that I have to convert it back to DV if I (maybe) wan't to use it for editing later? Or anything else?
    Thank's in advance again,
    André

  • Invalid Color Space error after update Reader to 9.3.3

    After updating Adobe Reader to 9.3.3 I run into the Invalid Color Space error when trying to open a PDF file created with CorelDraw 12 in the format PDF/X-1A.  This format needed by a printing office to print the file. The strange thing is that Reader opens older PDF files exported from CorelDraw in thsi format normally without the error message.
    It happens only with PDF exports made after the Reader update. CorelDraw settings are as previously used.
    Exports in other formats, other than  PDF/x-1, X-1A and X-3 open normally.  How to solve this??

    any suggestions?

  • Urgent help required: color template - use color ramp instead

    hello,
    I want to match color using the color matching vi. i understand you need a color template before executing the system.
    however i want to give my users the chance to choose any color from a color ramp and then this should be used an input to the color match vi (template). is this possible????
    if yes how... i have put a color ramp in the front panel and then put the output to the input of the color match template but get an error: not a template...
    thanks

    Hi farhan,
    Can you please send in some example code, as I can not find the VI you are talking about. The closest match I have is IMAQ Color Match and this does not have a template input.
    Please can you also tell me what version of LabVIEW you are using as well.
    Regards
    JamesC
    NIUK and Ireland

  • How do you edit the template image that appears at the top only in portrait mode?

    I am using a customized version of the iBooks Author template which has the space image. I have replaced the images for the book cover, chapter and section. But I noticed that when you rotate the ipad to view the entire TOC, the original space image is still there. How can I edit the template image that appears at the top of the Table of Contents only when you rotate the ipad in portrait view?

    I just tried w/that template - switched to Portrait mode...tapped once to select that image....cut - gone. Switched to Landscape...not there. Back to portrait...still gone.
    What process did you use?
    Can you repeat your issue with a fresh book?

  • Converting color .jpg image to grayscale

    I have a color .jpg image that I want to convert to grayscale and then add annotation. Is this easy to do in Illustrator?

    Thomas Crowley wrote:
    I've opened the .jpg image in Illustrator. It is a line drawing.
    Those two statements constitute a logical fallacy. A JPEG image is a bitmap, and not, in any way or fashion, a "line drawing". Therefore,
    ...I cannot edit individual parts of the drawing.
    is because the "individual parts" of the image are single color pixels. To "edit" these, you need a bitmap editor.
    It's necessary to say "edit" (w/quotes) because you will be editing pixels. Any notion of 'lines', 'planes', and 'shades' only exist in your mind, and not as physical separate objects somewhere inside the bitmap. If you think you can "select" a big black square "object" in the bitmap editor, well, that's because the software only makes you think you can (it's easy to scan for the edge of a single color filled region).
    ... I just felt you might need to know this.

  • Modifying colors in images

    I am trying to create a vi in Labview 7.1 that will upload an image from a jpeg file, modify the color and luminance of the image, and then output the image as a jpeg file. I am currently able to input and output the image to a file, but I am having difficulty modifying the colors of images. I read in a manual that the color control was a 32 bit array, but when I try to make my own array and wire it to the color control on the image block, it breaks the wire and won't let me make the condition. How do you design a proper array to set color and which array elements correspond to red, blue, green, hue, luminance, and saturation of the image? I am able to manually adjust the color and set my own color in rectangles, but I wanted to create an automated process with an array to automatically generate a range of colors.
    The other problem I was having was getting the image to be displayed on the visual panel of Labview. I can import and export the jpeg file, but I cannot get it to be displayed on the grid. I would greatly appreciate any assistance and advice you have.
    Thanks,
    Daniel

    If you are going to do some heavy image manipulation, you may wish to look into a LV toolkit called IMAQ, which allows you to go that way.
    If not, you can start by using the standard picture VIs (Graphics & Sound palette), which I assume you already do to read and write the file.
    LV treats a picture in one of three formats:
    1. Picture - the blue wire. You will need to to use this for any manipulation using the picture VIs.
    2. Pixmap. A 2D numeric array in which each cell holds the color value of the coresponding pixel.
    3. Flattened pixmap. A cluster holding all the picture information in which the pixel data is stored as 1D array.
    There are VIs for converting all these formats.
    To replace colors you can simply use Replace Array Subset to replace specific cells either in the 1D or 2D array or use the Draw point VI. The main problem you will have is that you will need to calculate everything on your own. If you want to modify the entire image, you can go over the array in a loop and (for example) increase all values by 1000 and see what that does.
    All of this can be found from reading the help files for the VIs (right click>>Help), which is what I suggest you do to learn more about this.
    You can display an image simply by converting to the first format right clicking the VI output (picture) and selecting Create>>Indicator. because it's a picture format, a picture indicator will automatically be created.
    It sound as if you don't have much experience in LV. Also, try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide.
    Try to take over the world!

  • Changing color of Image in PSE 8.0

    I have a logo design that is black on white.  I'd like to change the black to another color - in this case, blue.  I wqas able to do it, but it ended up being quite convoluted.  What are some simple ways to change the color of a selected area in Elements 8.  I'm using a PC, BTW.
    Thanks!

    Thank you.  I found another way that's even simpler.  I chose the paint brush, set the mode to lighten, and then just painted over the image with blue - the white didn't pick up any of the blue, but the black did.
    Date: Tue, 22 Feb 2011 17:02:09 -0700
    From: [email protected]
    To: [email protected]
    Subject: Changing color of Image in PSE 8.0
    1. Select the black (use the magic wand if it's all one color).
    2. Layer>New Adjustment Layer>Hue Saturation.
    3. Turn on the colorize checkbox in the layers panel, and move the sliders till you see the color you want.
    >

  • Invalid Structure Template KNKK of  DataSource KNKK_DataSource

    Hello,
    I am trying to create a Generic DataSource in R3 for BW.  My goal is to create a Generic DataSource for table KNKK in R3.  I am following some Generic DataSource instructions which appear to be very straightforward. I have named the DataSource "KNKK_DataSource".  I follow the steps, but when I try to save the DataSource, I get this error message, "Invalid Structure Template KNKK of  DataSource KNKK_DataSource".  I can see a field on this page that is called "ExtractStruct", but I am not able to enter anything into this field, and even if I could, I do not know what to enter.
    Can anyone provide some guidance?
    Thanks!

    hi Jim,
    yes, seems no infoproviders for 0fi_ar_9.
    take a look oss note 688859. however, there is ODS 0FIAR_O09 - oss 656687, please check if it's suitable,
    i have no access to system now.
    hope this helps.
    688859-Business Content for 0FI_AR_9 (Credit Management DataSource)
    Symptom
    There are no InfoProviders shipped by SAP for DataSource 0FI_AR_9
    (Credit Management: Control Area Data with Delta Extraction).
    You want to understand the reasons for this, and
    you are looking for guidance on possible usage scenarios for 0FI_AR_9.
    Other terms
    KNKK 0FI_AR_9 BWFI3D_GET_FIAR_CM_CAD DTFIAR_9
    Reason and Prerequisites
    This is a consulting note.
    Solution
    By standard, SAP does not offer any queries for 0FI_AR_9. The main reason for this is the following one: SAP R/3 ERP allows multiple n:m relationships between Customer, Credit Control Area, and Company Code. (For example, one customer could be allocated to many credit control areas, and one company code could have relations to many credit control areas, or vice versa). Moreover, those foreign key (n:m) relationships vary by customer installation. This makes it difficult to develop business content applicable to a wide variety of installations.
    There are multiple ways, however, how the information contained in 0FI_AR_9 could be made available e.g. for A/R reports. Some of those options include:
    - MultiProviders.
    - Reading of 0FI_AR_9 (from ODS) via update rules.
    - Central consolidated ODS layer.
    - Inclusion of relevant fields as attributes, e.g. for 0CUSTOMER.
    When doing so, make sure to pay particular attention to the following:
    - Potential implications of n:m relationships, as pointed out above.
    - Implications for delta behavior of 0FI_AR_9.
    - Possibly required mapping of calendar month to fiscal period.

  • Alpha Color on Images?

    Okay, Let's see if anyone knows this. Let's say I have a Image and I want to make the background transparent. It's certainly possible to load a transparent GIF89A, but say I want a normal gif and I want to "transparentize" it in code. Here's a code I have:
    //Precondition: 'global' is a predefined JApplet
    //                         'opaque' is a predefined Image with w,h > 0,0
    //Postcondition: An Image is returned with the background (as defined
    //                           as the color of the top-left pixel) replaced by the GIF89A
    //                           "transparent color"
    public Image makeTransparent(Image opaque)
      //makes an Image that is the same size as 'opaque'
      Image trans = global.createImage( opaque.getWidth(global), opaque.getHeight(global) );
      //gives me a graphics object to draw on this image
      Graphics g = trans.getGraphics();
      <redraw image substituting transparent for bg>
    }I need to know how to do the <>. My most obvious response would be to go though the Image's array of colors (the way an Image is stored) and change the "bg" color to transparent. But that brings up two questions. (a) Is it possible to access and change that array, and (b) What is the "transparent color" and can the Color object hold it?
    If anyone can answer this question or has another algorithm, I am offering "duke dollars" for this.

    Great news! It worked! Here is the algorithm: All you need is a BufferedImage. It isn't really as inefficient as it may look, either, but don't use it every frame.
    Color bg = new Color(bimage.getRGB(0,bimage.getHeight(null)-1), false);
    for(int xxx=0;xxx<bimage.getWidth(null);xxx++)
            for(int yyy=0;yyy<bimage.getHeight(null);yyy++)
                 if(new Color(bimage.getRGB(xxx,yyy), false).equals(bg))
                      bimage.setRGB(xxx,yyy,0&0&0&0);
    }

Maybe you are looking for