Results 1 to 8 of 8

Thread: Reduced color palette when using MemorySaveImage

  1. #1
    Join Date
    Jun 2016
    Posts
    5

    Reduced color palette when using MemorySaveImage

    I am using a DMK23U274 camera and LabVIEW 2015 64bit. When I save images using MemorySaveImage or MemorySaveImageJpeg, the resulting file contains only very few color values (34 of the 256 availiable in a grayscale image). In the PropertyBrowser of the ActiveX control, the MemoryCurrentGrabberColorFormat is Y8.

    However, saving the image using ICCapture works fine. Please compare the attached images.
    test_ICCapture_imhist.jpgtest_LabVIEW_imhist.jpg


    Any help would be appreciated.

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,898

    Re: Reduced color palette when using MemorySaveImage

    Hello

    "MemoryCurrentGrabberColorFormat is Y8". It should be "Y800". Do you set this format into the property in your VI?
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Jun 2016
    Posts
    5

    Re: Reduced color palette when using MemorySaveImage

    Dear Stefan,

    thanks for the quick reply! No I never set the format in my code. How would I do this?

  4. #4
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,898

    Re: Reduced color palette when using MemorySaveImage

    No I never set the format in my code. How would I do this?
    You set it by
    IC.MemoryCurrentGrabberColorformat = ICY800.

    If you are used to LabVIEW, I am sure you now, how to invoke a property node, change it to write and create a constant.

    This depends on which VIs use at all. I will not start guessing here, what you are doing.

    I also see a histogram. I do not see the image itself.

    I do not know anything about your computer, e.g. Model, manufacturer, Windows version. I do not know, which camera driver you use.
    I do you not which video format you have set.

    For more diagnosis, please give me these information.
    Best regards
    Stefan
    IC Imaging Control Support

  5. #5
    Join Date
    Jun 2016
    Posts
    5

    Re: Reduced color palette when using MemorySaveImage

    I have tried setting different color formats by using the MemoryCurrentGrabberColorformat Property node, and I have tried setting it before opening the device, after opening it and after calling the IC_LiveStart.vi. I tried out ICY8, ICY800, ICBY8 and ICRGB24, but it did not seem to make a difference, the histogram still looks like before, and no error was thrown even though the camera should not support an RGB colorformat. Please find an example picture attached:
    MemorySnapImageJpeg_ICY800.jpg

    The LabView program structure is roughly as follows: I use an ICImagingControl, in an initialization routine I call IC_GetDevices(ICImagingControl), IC_OpenDevice(ICImagingControl, color=false, live=true), IC_LiveStart(ICImagingControl). After user input I call IC_SetExternalTrigger(ICImagingControl, Trigger=true). Another user input calls IC_MemorySnapImage(ICImagingControl) and IC_MemorySaveImageJpeg(ICImagingControl, filename, quality=100). Then the external trigger is sent to the camera in form of a TTL pulse.

    I did not set the video format, the property browser shows n/a and it does not seem to be accessible from NIMAX. I'm using LabVIEW version 15.0f2 (64-bit) with the latest IC Imaging LabVIEW Extension.

    Device Driver: The Imaging Source Europe Gmbh DMK 23U274, File Version: 6.1.7600.16385 (win7_rtm.090713-1255)

    Some of the output of DxDiag:
    ------------------
    System Information
    ------------------
    Operating System: Windows 7 Enterprise 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_ldr.160408-2045)
    Language: German (Regional Setting: German)
    System Manufacturer: Dell Inc.
    System Model: Latitude E4300
    BIOS: Phoenix ROM BIOS PLUS Version 1.10 A26
    Processor: Intel(R) Core(TM)2 Duo CPU P9400 @ 2.40GHz (2 CPUs), ~2.4GHz
    Memory: 8192MB RAM
    Available OS Memory: 8080MB RAM
    Page File: 4965MB used, 7112MB available
    Windows Dir: C:\Windows
    DirectX Version: DirectX 11
    DX Setup Parameters: Not found
    User DPI Setting: Using System DPI
    System DPI Setting: 96 DPI (100 percent)
    DWM DPI Scaling: Disabled
    DxDiag Version: 6.01.7601.17514 32bit Unicode


    Thanks for looking into this!

  6. #6
    Join Date
    Jun 2016
    Posts
    5

    Re: Reduced color palette when using MemorySaveImage

    I noticed that NIMAX displays the Colorformat as RGB24, and the value of the MemoryCurrentGrabberFormat property node is 5 (RGB24) as well. This can be changed when writing to the property node in Labview, but it does not resolve the problem.

    If I however call the ShowDeviceSettingsDialog method and change the colorformat to Y800 in there, the images are saved correctly afterwards. However, this does not update the MemoryCurrentGrabberFormat property node value nor the entry in NIMAX. After restarting my Labview Program, the colorformat is reset to RGB24.

    Is there another way to change the Colorformat programmatically?

    Thank you for your time.

  7. #7
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,898

    Re: Reduced color palette when using MemorySaveImage

    The video format sent by the camera is converted automatically into the pixel format set in MemoryCurrentGrabberColorFormat. Thus:
    Camera = Y800, MemoryCurrentGrabberColorFormat RGB24 => RGB24 graysscale
    Camera = RGB32, MemoryCurrentGrabberColorFormat RGB24 => RGB24 color
    Camera = RGB32, MemoryCurrentGrabberColorFormat Y800 => Y800 grayscale
    Camera = RGB24, MemoryCurrentGrabberColorFormat Y800 => Y800 grayscale
    Camera = Y800, MemoryCurrentGrabberColorFormat Y800 => Y800 grayscale

    Thus the colorformat used by the camera does not play such a big role. But I have a question: Which video format do you use without calling ShowDeviceSettingsDialog?

    You can set the video format programmatically by passing it to the "VideoFormat" property node of IC, as shown in the ActiveX documentation:http://www.theimagingsource.com/supp...ideoFormat.htm

    You can pass as string like "RGB24 (640x480)" to the video format property.
    Best regards
    Stefan
    IC Imaging Control Support

  8. #8
    Join Date
    Jun 2016
    Posts
    5

    Re: Reduced color palette when using MemorySaveImage

    Thank you Stefan,
    setting the video format to "Y800 (1600x1200)" did the trick.

Similar Threads

  1. Show full image in reduced size control
    By carnaby in forum IC Imaging Control .NET
    Replies: 10
    Last Post: May 15, 2014, 13:37:38
  2. MemorySaveImage PNG option?
    By Vostok in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: December 14, 2011, 15:44:47
  3. MemorySaveImage format
    By sdecorme in forum IC Imaging Control .NET
    Replies: 8
    Last Post: September 4, 2008, 09:27:38
  4. Color palette
    By Nico28 in forum IC Imaging Control .NET
    Replies: 1
    Last Post: April 19, 2005, 17:03:35
  5. MemorySaveImage - image is black
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: March 15, 2002, 18:11:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •