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 set the option of "tools-image analyzer" in CCSV5.2

I have used matlab to transfer a bmp image into a data file and assign them in an array in CCS.

Then in the debug mode, I select tools-image analyzer. But I  do not know how to set it to show the image. (just as the picture shows)

Could anyone help me.Thanks for your attention for this matter.

  • Hi,

    The correct parameters greatly vary depending on the image itself. In the past I helped someone display a greyscale image at this thread.

    I hope this helps,

    Rafael

  • Thanks for your reply.

    The value of my image is "250*209,24 bits,bmp". As you suggested in that post, I set the value as below:

    But the showing  image is always black:

    :

  • BTW, I first use a matlab program as below to convert the file into a data file:

     -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    clear   
    clc
    [RGB,map]=imread('e:\1.bmp');  %共有250*209=52250个点
    H=RGB;


    r=H(:,:,1);
    g=H(:,:,2);
    b=H(:,:,3); 
      [M,N]=size(r)
     for i=1:M;
        for j=1:N;
             I(i,j)=0.2989*r(i,j)+0.5870*g(i,j)+0.1140*b(i,j); 
        end
     end
    I2=[r,g,b];
    I1=double(I);

    %  imview(I1,map);
     fid=fopen('e:\bmp.dat','wt');   %打开一个文件写入数据
    % fid=fopen('e:\bmp.dat','w');
    n=0;
    for i=1:209
    for j=1:250
        n=n+1;
        
    fprintf(fid,'0x%x,\t',I1(i,j));

              if rem(n,15)==0;
              fprintf(fid,'\n'); 
              end
        
    end
    end
    fclose(fid);

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Then in CCS ,I assign the elements to an array named in_data like this:

    unsigned char in_data[52250]={0x39, 0x2e, 0xa0, 0x3e, 0x1e, ....................}

  • This is the image I want to show