TI E2E Community
Digital Signal Processors (DSP)
DaVinci™ Video Processors
DM64x DaVinci Video Processor Forum
Line distortion problem in an image (dm6437)
I have a white image loaded to external memory. (size is 240*320)
At the run time, I manipulate the pixel values and draw a couple of black horizontal lines and a vertical black line to the image.
However, I get a yellow shadow-like around the vertical line.
Here is the picture:
You can also see the image here:
The horizontal lines are ok, but vertical line seems to have a problem. And the weird thing is I don't use any yellow pixel value, just 0x000000 for a pixel.
Do you have any idea what should cause this problem? (I am having output in interlaced composite mode, and using a tv-capture card to take the output on my computer (crt monitor) )
My suspicion on this is that it is an artifact of the display you are using, or specifically given your setup, the tv capture card (I am guessing that the large change in value along the vertical line is generating false color in the video decoder on your capture card). If possible you may want to look at the signal directly on a TV set, or at least some other display mechanism. You may also want to try some other patterns such as if you made a line of another color that is not as dark or that is wider to see what the results are to better understand the distortion, but as it is likely that this is an artifact of your display it may not be worth investigating too much (assuming an alternative display does not show the artifact).
I now realize the problem may be not just related with the tv capture but the way I am filling the color values.
I go through a loop vertically in image, filling the related array field with the value of black. But since an Uint32 array field holds 32 bit data, a pixel and a 1/3 pixel value is represented. When I write the black value to the fields, I don't do any precaution about this. I will look into it.
That would also certainly cause such a problem, you do need to have code that only writes to pixel values you want to change, what color space are you using for the image you are drawing in memory? If you had a condition like this in YCbCr it could explain the yellow, since a pixel of FF Y, 128 Cr, and 0 Cb comes out as yellow (though since this is 2 bits per pixel I would ahve expected a light blue on the other side of the line), alternatively if you were in the RGB space that would mean you would have FF R, FF, G, and 00 B for yellow, however for RGB888 i would expect the bad color on just one side.
I did some searching and found some utilities at http://www.dvd-replica.com/DVD/colorrgb2.php which allow you to try out various RGB and YCbCr values to see the resulting color, this may be handy in figuring out how your image is getting to be the way it is.
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.