This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to view image data in memory?

I would like to render image data in memory to a window in CCS. I looked at the image viewer but could not see how to specify a memory address. Is there a viewer which takes image address, resolution, and image format? The image data is in target memory.

Thank you
~ Ramsey

  • Ramsey,

    Check the Properties tab of the Image viewer - it allows you to specify all the parameters you mentioned. The section Advanced Data Visualization of the page below shows a screen capture of it:

    http://processors.wiki.ti.com/index.php/GSG:Debugging_projects

    Hope this helps,

    Rafael 

  • Rafael,

    Thank you for your reply. This is just what I am looking for. The link helped a lot. I was able to get it to work but it took quite some fiddling to get it right. Here are the issues I encountered.

    1. Load memory type-size defaults to 8-bit. It needs to be 32-bit.
    2. The properties page of the image analyzer did not have an RGB section. The Image Format default was undefined. I got luck when I clicked in the text box and saw a pull-down menu. Selecting RGB opened the RGB section below with all the additional properties. Adding a comment regarding this would be helpful.
    3. There are new shift properties which initialize themselves, but it would be good to update the screen shot.

    The data file does not seem to be a standard image format. What tool can I use to create such a data file from a JPG image file?

    Thanks
    Ramsey

  • Ramsey,

    I am glad the link helped. Please see my comments;

    1. Depends on the target device and how the image was created, therefore any value can be the default.

    2. You are right. I modifyed the page to reflect this.

    3. Some changes were made to the options in the later release of CCS. A more general update to the GSG is planned to happen in a few days.

    This image was dumped directly from the DM6446 memory, but I found an utility that seems to do a similar job from existing compressed/encoded file formats:

    http://www.imagemagick.org/script/formats.php

    Hope this helps,

    Rafael

     

  • Rafael,

    Thank you again for the link. I downloaded the utility and after some fiddling go it to work. Here are the steps I took to save time for the next user.

    1. Download ImageMagick-6.6.5-8-Q8-windows-dll.exe. Run installer, select option to add install directory to system path.
    2. Download attached image logo jpg file: TI-C6A816x_397x298.jpg. I used Microsoft Picture Manager to crop the original JPG file to 1.33 aspect ratio.
    3. Convert the JPG image to RGBA format and resize at the same time. Run this command in a Windows Command Prompt:
      convert TI-C6A816x_397x298.jpg -adaptive-resize 320x240 -depth 8 TI-C6A816x_320x240.rgba
    4. In CCS, select View > Memory and load file option. Select rgba filename above and set type-size to 32 bits. Specify a start address.
    5. In CCS, Tools > Image Analyzer. Set properties page to
      Image Format = RGB
      Pixels per line = 320
      Lines = 240
      Format = Packed
      Pixel stride = 4
      Red Mask = 0xFF000000
      Green Mask = 0x00FF0000
      Blue Mask = 0x0000FF00
      Alpha Mask  0x000000FF
      Line stride = 1280
      Image Source = Connected Device
      Start address = (memory load address above)
      Read data as = 8 bit data

    ~ Ramsey

  • Ramsey,

    Thank you for reporting this; this is good information. I will add this information to the GSG as an additional topic.

    Cheers,

    Rafael