Board index » delphi » Brightness & Contrast on AVI
Pablo Pedrocca
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
|
Pablo Pedrocca
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
Brightness & Contrast on AVI
Hi,
does anybody know how to change the Brightness or Contrast of an AVI file when playing? Thanx. |
Earl F. Glyn
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIQuotePablo Pedrocca <pjpedro...@onenet.com.ar> wrote in message Quote> does anybody know how to change the Brightness or Contrast of an AVI the AVI -- execept perhaps for very small images. A brightness adjustment is easy -- you just "visit" each pixel and add a Contrast enhancement is a bit trickier, especially for color images and With some hardware assistance (perhaps from DirectX?) this might be ___ Earl F. Glynn E-Mail: EarlGl...@att.net efg's Computer Lab: http://www.efg2.com/Lab |
Steve Schafer (Tea
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIOn Thu, 29 Jul 1999 08:37:14 -0500, "Earl F. Glynn" Quote<EarlGl...@att.net> wrote: enhance contrast, but obviously wouldn't be optimal in any sense. In any case, as you say, the thought of trying to do this in real time on anything but a small thumbnail boggles the mind. -Steve |
Earl F. Glyn
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVISteve Schafer (TeamB) <pand...@telepath.com> wrote in message news:37ac6e08.146295193@90.0.0.40... Quote> In images as large as 640-by-480 with simple pixel manipulations. In a few years, with multi-GHZ processors, real-time may be possible efg |
Gord
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIgeez! Contrast is a simple color transformation.. it can be calculated very quickly into a lookup table and applied to each frame on the fly. (this is taken from my graphics library FastLIB) type TLut = array[Byte]of Byte; //lookup table function ContrastLut(Amount:Integer):TLut; function Lightnesslut(Amount:Integer):TLut; applying the Lut is simple.. just loop through your pixels and |
Gord
![]() Delphi Developer |
Mon, 14 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIQuote>But aren't you assuming pf8bit PixelFormat and palettes? colorspace is orthagonal. So any lookup table can be applied to an RGB image simply by using 3 lookup tables, or the same one for each r,g,b byte. Quote>How does your suggestion work with 15-bits/pixel high color need to apply the lookup table to each r,g,b of each color in its color table.. with 16,24,and 32 you apply the lookup table to each r,g,b of each pixel. Quote>"Contrast" is really just using the whole range of an address pixels.. and anytime you are just changing the color, you can put it into a lookup table to apply to each and every pixel (because there are more pixels than colors ;-).. if you still have trouble understanding, I can send you a sample delphi project.. you adjust gamma correction and brightness the same way -Gordy |
Earl F. Glyn
![]() Delphi Developer |
Tue, 15 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIQuoteGordy <gf...@jps.net> wrote in message news:7nr7b6$bkn1@forums.borland.com... Look up tables aren't used that much with high color or true High color and true color images don't use palettes. How does your suggestion work with 15-bits/pixel high color "Contrast" is really just using the whole range of an address With pf24bit images one might trying converting Please explain why you think contrast is a simple I've searched several image processing textbooks ___ Earl F. Glynn E-Mail: EarlGl...@att.net efg's Computer Lab: http://www.efg2.com/Lab |
Earl F. Glyn
![]() Delphi Developer |
Tue, 15 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIQuoteGordy <gf...@jps.net> wrote in message news:7nrrh4$c655@forums.borland.com... image for contrast enhancement? While the R-G-B planes are orthogonal for defining color, you can't apply techniques appropriate for a single plane to all three color planes without unintended side effects. Or, I should say, sometimes you can, but not always. For example, histogram stretching (or histogram equalization) is a great BUT if you apply this same technique individually to the planes of a color In the old DOS days you could easily control the hardware of graphics Perhaps I'm wrong, but I think look up-table techniques will be It's fairly easy to have a single true color image with thousands Real-time is fast and easy if you just change the palette Earl F. Glynn E-Mail: EarlGl...@att.net efg's Computer Lab: http://www.efg2.com/Lab |
Gord
![]() Delphi Developer |
Tue, 15 Jan 2002 03:00:00 GMT
Re:Brightness & Contrast on AVIQuote>Yes, this is all very true. Have you ever actually applied this to a color stuff -> fastlib -> examples.. you can apply contrast, and I've never experienced the 'side effect' you speak of Quote>BUT if you apply this same technique individually to the planes of a color and this will not happen Quote>In the old DOS days you could easily control the hardware of graphics same effect by rotating an 8bit DIB's colortable in highcolor mode Quote>Perhaps I'm wrong, but I think look up-table techniques will be when you apply it just the color table of an 8bit dib (then hardware changes the image), but is still extremely effective for high color images.. as the lookup table still applies. Have a look at the code and resulting image. let me rephrase: anytime you make a change to the color space of an image -Gordy |