+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Member level 5
    Points: 1,025, Level: 7

    Join Date
    May 2015
    Posts
    85
    Helped
    1 / 1
    Points
    1,025
    Level
    7

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

    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?

    •   AltAdvertisment

        
       

  2. #2
    Member level 2
    Points: 419, Level: 4

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    53
    Helped
    8 / 8
    Points
    419
    Level
    4

    Re: How to feed a grayscale image data to VGA output of an FPGA




  3. #3
    Member level 5
    Points: 1,025, Level: 7

    Join Date
    May 2015
    Posts
    85
    Helped
    1 / 1
    Points
    1,025
    Level
    7

    Re: How to feed a grayscale image data to VGA output of an FPGA

    I can not find them useful!!!



    •   AltAdvertisment

        
       

  4. #4
    Member level 2
    Points: 419, Level: 4

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    53
    Helped
    8 / 8
    Points
    419
    Level
    4

    Re: How to feed a grayscale image data to VGA output of an FPGA

    Quote Originally Posted by rafimiet View Post
    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/...representation

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

    Regards

    - - - Updated - - -

    Quote Originally Posted by rafimiet View Post
    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

    Regards



  5. #5
    Member level 5
    Points: 1,025, Level: 7

    Join Date
    May 2015
    Posts
    85
    Helped
    1 / 1
    Points
    1,025
    Level
    7

    Re: How to feed a grayscale image data to VGA output of an FPGA

    Quote Originally Posted by FlyingDutch View Post
    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?



  6. #6
    Member level 2
    Points: 419, Level: 4

    Join Date
    Dec 2017
    Location
    Bydgoszcz - Poland
    Posts
    53
    Helped
    8 / 8
    Points
    419
    Level
    4

    Re: How to feed a grayscale image data to VGA output of an FPGA

    Quote Originally Posted by rafimiet View Post
    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:

    http://www.fpga4fun.com/files/HDMI_D...d_rev_1_02.pdf

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

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

    http://www.analog.com/en/analog-dial...made-easy.html

    Kind regards


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  7. #7
    Super Moderator
    Points: 63,207, Level: 61
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    12,926
    Helped
    2980 / 2980
    Points
    63,207
    Level
    61

    Re: How to feed a grayscale image data to VGA output of an FPGA

    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
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

  8. #8
    Member level 5
    Points: 1,025, Level: 7

    Join Date
    May 2015
    Posts
    85
    Helped
    1 / 1
    Points
    1,025
    Level
    7

    Re: How to feed a grayscale image data to VGA output of an FPGA

    Quote Originally Posted by KlausST View Post
    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.



--[[ ]]--