Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How to feed a grayscale image data to VGA output of an FPGA

Status
Not open for further replies.

rafimiet

Member level 5
Joined
May 21, 2015
Messages
94
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,364
The VGA port in general has 4 pins for each R,G and B. If I am working on a grayscale (monochrome) image on my FPGA, how am I supposed to supply the data to the R,G,B pins of VGA port?

Also if I have a true color image with 8 bit each for R, G and B, how can I feed that data to VGA?
 

I can not find them useful!!!

Hello,

Conversion of a grayscale to RGB is simple. Simply use R = G = B = gray value. The basic idea is that color (as viewed on a monitor in terms of RGB) is an additive system.

See link:

https://stackoverflow.com/questions/835753/convert-grayscale-value-to-rgb-representation

BTW: This is a conclusion from "Average" method given in links I gave you in earlier post ;-)

Regards

- - - Updated - - -

Also if I have a true color image with 8 bit each for R, G and B, how can I feed that data to VGA?

Hello,

answer to this question:

If you have more bits for color than in input VGA feed it with most significant bits of each color.

If your goal is different from my answers then, describe it more precisely please :-D

Regards
 

Hello,

If you have more bits for color than in input VGA feed it with most significant bits of each color.

Regards

That means some of the information has to be lost.... What about HDMI port? Do we lose some info there as well? if we have a gray scale image of 8 bit each pixel?
 

That means some of the information has to be lost.... What about HDMI port? Do we lose some info there as well? if we have a gray scale image of 8 bit each pixel?

Hello,

"That means some of the information has to be lost..." - yes but practically it looks well [ i often used few more significant bits to feed VGA monitor (and lost less significant bits), and colors had been looking OK and similiar].

I didn't use HDMI, but as far as I remember HDMI driver has an VGA circle as main component + TDMS codecs. See links:

https://www.fpga4fun.com/files/HDMI_Demystified_rev_1_02.pdf

https://www.fpga4fun.com/HDMI.html

https://www.fpga4fun.com/files/WP_TMDS.pdf

https://www.analog.com/en/analog-dialogue/articles/hdmi-made-easy.html

Kind regards
 
Hi,

That means some of the information has to be lost.... What about HDMI port? Do we lose some info there as well? if we have a gray scale image of 8 bit each pixel?

Yes, you loos the complete color information. You will never find out if it was red or green...

Maybe you just talk about grey_scale_resolution.
But did you ever try to see the difference between (128, 128, 128) and (129, 129, 129)?
Or at both ends of the greyscale (black, white)?

Klaus
 
Hi,

Maybe you just talk about grey_scale_resolution.
But did you ever try to see the difference between (128, 128, 128) and (129, 129, 129)?
Or at both ends of the greyscale (black, white)?

Klaus

Yes I get grayscale results, but the output image frame is so noisy as compared to actual image.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top