Click to See Complete Forum and Search --> : playing with buffers
lk@7
January 2nd, 2006, 02:39 AM
Sorry that i have not supplied any code since i could wasted time easily to process this fastest.
got an image buffer of size n. each pixel size could be x = 8, 9, ,.., or 16 bits.
In general, how to convert this image buffer to a 16 bit or 2 bytes per pixel image ushort buf?.
pixels in this image buffer could be in form of xbitsxbitsxbitsxbits... or as 2 bytes each.
ahoodin
January 6th, 2006, 10:50 AM
In OpenGL SetPixelFormat() does it. Not really sure in DirectX, don't do any.
http://www.imaging-components.com/Imaging-Components/Image-Processing/bits-per-pixel.shtm
Here is a pretty good description of bits per pixel.
eg 24 bit = 8 Bits per R/ 8 bits per G/ 8 bits per B
eg 16 bit = 5 Bits per R/ 5 bits per G/ 5 bits per B
etc
ahoodin
PS: If this did help dont forget to rate.
lk@7
January 7th, 2006, 12:56 AM
this is all in grayscale. no color. needs much of bits&bytes manipulations.
ahoodin
January 9th, 2006, 07:34 AM
How would Hollywood handle this?
I mean they colorized all the old black and white shows.
I think it requires a lil bit of work. I mean you would have to correspond a shade of gray to a color, and run some process on every frame or stationary picture.
ahoodin
...and if this did help, dont forget to rate.
Marc G
January 9th, 2006, 08:17 AM
[ moved thread ]
Marc G
January 9th, 2006, 08:19 AM
How would Hollywood handle this?
I mean they colorized all the old black and white shows.
I think it requires a lil bit of work. I mean you would have to correspond a shade of gray to a color, and run some process on every frame or stationary picture.
You can't simply map a grayscale to a color value. In 8 bit grayscale, there are 256 different shades of gray. In 24 bit RGB, there are around 16 million color shades. You cannot map 256 grayscales to 16 million colors. I think there is a lot of manual work involved with converting grayscale movies to color movies.
ahoodin
January 9th, 2006, 11:40 AM
You can't simply map a grayscale to a color value. In 8 bit grayscale, there are 256 different shades of gray. In 24 bit RGB, there are around 16 million color shades. You cannot map 256 grayscales to 16 million colors. I think there is a lot of manual work involved with converting grayscale movies to color movies.
Well in Film, i mean real film, there are probably almost infinite shades of grey.
Which probably meant that they had to convert the film to true color or high color and then map it around or maybe manually bang the colors around.
ahoodin
Marc G
January 10th, 2006, 03:38 AM
No, there is no automatic way of doing this that works perfectly.
Converting black and white movies to color is a manual job. Each frame has to be colored manually. From http://entertainment.howstuffworks.com/question184.htm :
Most of the classic black-and-white movies have been "colorized," mainly so that they can be shown on television in color. It turns out that the process used to add the color is extremely tedious -- someone has to work on the movie frame by frame, adding the colors one at a time to each part of the individual frame.
To speed up the process, the coloring is done on a computer using a digital version of the film. The film is scanned into the computer and the coloring artist can view the movie one frame at a time on the computer's screen. The artist draws the outline for each color area, and the computer fills it in. The original black-and-white film holds all of the brightness information, so the artist can paint large areas with a single color and let the original film handle the brightness gradients. This means that the artist might only have to add 10 or so actual colors to a scene.
To speed up the process even more, interpolation is common. From frame to frame, there is normally very little variation in the position of objects and actors. (See, for example, the frame-by-frame demonstration on this page of How Television Works.) Therefore, the artist might manually color every tenth frame and let the computer fill in the frames in between.
ahoodin
January 10th, 2006, 07:22 AM
No, there is no automatic way of doing this that works perfectly.
Converting black and white movies to color is a manual job. Each frame has to be colored manually. From http://entertainment.howstuffworks.com/question184.htm :
Guess its a joint venture:
To speed up the process even more, interpolation is common...
Therefore, the artist might manually color every tenth frame and let the
computer fill in the frames in between.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.