• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » DLP & MEMS » DLP LightCommander Development Platform » LightCommander
Share
DLP & MEMS
  • Forums
Options
  • Subscribe via RSS

LightCommander

LightCommander

This question is answered
Fritz Graber
Posted by Fritz Graber
on May 26 2011 08:56 AM
Prodigy50 points

How can i convert a *.bmp image to *.dbi? Is there an external tool or a SW example available?

Thaks for any help,

Fritz

DLP LightCommander software DLP LightCommander DLPC200 API Light commander API
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Sanjeev
    Posted by Sanjeev
    on May 27 2011 03:59 AM
    Expert5645 points

    Hi Fritz,

    Welcome to DLP&MEMS forum.

    The DLP LightCommander(TM) Control GUI has inbuilt functionality of generating .dbi out of .bmp file. There is NO external tool available for the same. Can you let me know what exactly you are trying to do with this utility?

    FYI, there is another API available for which you don't need to convert the .bmp to .dbi file to download it to external memory the API name is  "DLP_Img_DownloadBitplanePatternToExtMem" please see the API documentation for more details. 

    Regards,

    Sanjeev

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Fritz Graber
    Posted by Fritz Graber
    on May 27 2011 06:20 AM
    Prodigy50 points

    Hi Sanjeev,

    Thank you for the answer.

    I try to send images to the LightCommander. The images are in the *.raw format. My development environment is Visual Studio C#. The LightCommander API is working.

    Is there an example available?

    Regards,

    Fritz

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sanjeev
    Posted by Sanjeev
    on May 30 2011 01:41 AM
    Expert5645 points

    Hi Fritz,

    You have mentioned that the LightCommander API is working. Now, I am not clear on the API example you are looking.. Can you be more clear on this?

     

    For the API DLP_Img_DownloadBitplanePatternToExtMem API the documentation is already provided; copying the same below 

    For this API to be used, the input image data must first be formatted properly, which involves 2 steps:

    1. Split out each bit plane individually

    2. pack 8 pixels into each byte (e.g. pixel#0 maps to LSB, pixel#1 maps to LSB+1, etc.)


    Regards,

    Sanjeev

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Fritz Graber
    Posted by Fritz Graber
    on May 30 2011 03:50 AM
    Prodigy50 points

    Hi Sanjeev,

    I suspect that my conversion is wrong. My source is a *.bmp image. How can I convert this to a' LigthCommander format'?

    Regards,

    Fritz

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sanjeev
    Posted by Sanjeev
    on May 31 2011 16:34 PM
    Verified Answer
    Verified by Fritz Graber
    Expert5645 points

    Hi Fritz,

    You can follow below method to get it in LightCommander format. This explanation is applicable for DLP_Img_DownloadBitplanePatternToExtMem API . Care must be taken that the file BMP size is 1024*768 pixels. 

    You could use any freely available tools (For example IrfanView) to convert the BMP file to RAW 1bpp gray scale format; which I think this you are doing already. So, after the conversion the generated RAW file size becomes 1024*768 = 786432 bytes.  To make sure the file conversion is successful you can open it in any binary hex editor see there will be only 0xFF or 0x00 entries. As you can see here in the RAW file a pixel is represented as a byte but for LightCommander it expects a byte to contain the information of 8 pixels. For this you can write small script or program to do the following:

    STEP 1) Open the RAW file 

     

    STEP 2) Read 8 bytes at a time from the beginning till end. 

     

    STEP 3) Now these 8 bytes should be converted into 1byte i.e., every 1byte (of 8bytes) translates into 1bit of a byte. For this order to be followed will be LSB byte (of 8byte) map to LSbit of a byte. That is you must understand when 8bytes are read from the file the MSB byte is at the start or at the end of the 8 byte array (see explanation CASE 1 and CASE2 below)

    How to decide the whether bit is '1' or '0'? It is simple, if the byte = 0xFF the bit = '1' and if byte = 0x00 the bit = '0'.

    For example - Let us assume the read 8 bytes string to be "0x00 0xFF 0x00 0xFF 0xFF 0x00 0x00 0xFF"

    CASE 1: If the MSB byte is the "first" in the array of 8 bytes

    Read 8 bytes: 0x00 0xFF 0x00 0xFF 0xFF 0x00 0x00 0xFF

    Translated bye:  0-1-0-1-1-0-0-1 = 0x59

    CASE 2: If the MSB byte is the "last" in the array of 8 bytes

    Read 8 bytes: 0x00 0xFF 0x00 0xFF 0xFF 0x00 0x00 0xFF

    Translated bye:  1-0-0-1-1-0-1-0 (the order is reversed because MSB at the last) = 0x9A

     

    STEP 4) The file size after conversion reduced to 786432/8 = 98304 bytes or 96KB.
    STEP 5) Now, the newly generated binary file can be directly used  in DLP_Img_DownloadBitplanePatternToExtMem API to download to the external memory for display.
    Let me know if you are still facing issues or not clear on the above.

     

    Regards,

    Sanjeev

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Yuma Tsuboi
    Posted by Yuma Tsuboi
    on Aug 17 2011 13:18 PM
    Prodigy120 points

    Is this only for 1bpp images? I would like to project 8bpp images...would this API accompany that?

    If so, how would I do it?

     

    Thank you,

    Yuma

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sanjeev
    Posted by Sanjeev
    on Aug 18 2011 00:15 AM
    Expert5645 points

    Hi Yuma,

    The API helps you to download individual 1bpp image. 

    If you want to download 8bpp image you will need to call the API 8 times. Before that you would require to split 8bpp image into 8 1bpp images.

    Splitting procedure for 8bpp image - 

    1) As 8bpp means 8bits to represent a pixel; copy ALL pixel's bit0 to into 1 file similarly repeat the procedure for bi1,bit2,...,bit7. 

    2) At the end of the exercise you will have 8 individual files.

    3) For each file as explained above pack them into bytes. Each file size would reduce to 1/8 from it's previous size.

    4) Call the API repeatedly 8 times to download into external memory. Make sure the call order is maintained. bit0-file, bit1-file,....,bit7-file

     

    Regards,

    Sanjeev

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • fil mag
    Posted by fil mag
    on Apr 02 2012 08:06 AM
    Prodigy100 points

    Dear Fritz,

    did you succeed in doing this?

    If so, could you please provide me some code? I'm really in a struggle to put this to work with LabVIEW...

    Any help would be greatly appreciated.

    Thank you very much in advance!

    lightcommander labview dbi
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use