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.

Displaying image on image analyzer



Hi,

I am using omap l138 lcdk with ccs v6 for doing an image processing application. I have been able to read the input image through the image analyzer and perform the desired algorithm. The image has two intensity levels 0 and 256. The histogram meets the desired specifications but I am not able to display the image through the image analyzer. Though I am able to view the image using matlab using the image data obtained from ccs. I am attaching along this post my c code used and other relevant data required. My original image is comparatively large of the size of 452 X 450 but for using it in ccs I am converting it into 256 X 256. I am obtaining the required image data from matlab. My algorithm consists of individually analysing the r,g,b components of  and performing segmentation using wavelet networks. To make the computation easy I am not doing the weight determination part in ccs. I am simply copying the weight values from matlab and performing the rest of the algorithm. Can anybody help me how to display the output image. Thanking you in advance.thesisfinal.rar

  • Hi,

    Thanks for sending the details; however, I am not entirely sure which variable holds the final image. My guess is that it is Xfinal, am I correct?

    If so, I ran the program and got the following image as a final result: a series of bits that were either 255 or 0 - no other levels were present on the output

    Is this correct? If so, check the parameters I used to display it.

    If not, can you send me what you would exactly expect from the output?

    Regards,

    Rafael

  •  Hi Rafael,
    First of all let me thank you for replying. Yes Xfinal is the output variable and it does holds two intensity levels i.e 0 and 255. But the output that I am supposed to get is not what has been obtained. Its a black and white image of a lesion whose information has been provided along with the code as lesion(red/green/blue)data.H. There is an image by name img.jpg which shows the actual image. And regarding the parameters I used the rgb format and I believe that is not much of an issue here. I have also attached along with the image output that I am expecting.

  • Hi,

    Thanks for sending the additional details. I was able to display the basic image shape, although you can play with the RGB components.

    I used the following parameters:

    Depending on the mask settings, you can have different color tones such as:

    One detail to notice is that some parameters are redundant - for example, Pixel stride (bytes) and Read data as, or Line stride (bytes) = Number of pixels per linePixel stride (bytes). I am not 100% sure why this was done this way, but by correctly adjusting this parameters the image works as expected.

    Hope this helps,

    Rafael

  • Hi,

    I just noticed the image is rotated by 90° clockwise. Given the image analyzer scans memory only incrementally, this probably reflects how the image is stored in memory - a matrix transpose operation would be needed to reorder the image.

    Regards,
    Rafael
  • Hi,
    Thanks for helping me out. But can you please tell me what changes you made to the previous post to display the result. I am also using almost the same setting as you have displayed except for pixel strides=1,red/green/blue mask as 0XFF , line strides as 256 and read data as 8 bit. And secondly regarding the clockwise shift I was able to get the image displayed correctly thanks to you.