¡@

Home 

2014/10/15 ¤U¤È 10:11:13

iphone Programming Glossary: luminance

Fragment Shader - Average Luminosity

http://stackoverflow.com/questions/12168072/fragment-shader-average-luminosity

I just had to average those four pixels to yield a 16X reduction in pixels in a single step. I converted the image to luminance at the very first stage using a dot product of the RGB values with a vec3 of 0.2125 0.7154 0.0721 . This allowed me to just.. reduction stage which really helps on iOS hardware. Note that you don't need this if you are starting with a Y channel luminance texture already but I was dealing with RGB images. Once the image had been reduced to a sufficiently small size I read the..

OpenGL ES 1.1: How to change texture color without losing luminance?

http://stackoverflow.com/questions/4361023/opengl-es-1-1-how-to-change-texture-color-without-losing-luminance

ES 1.1 How to change texture color without losing luminance I have particles that I want to be able to change the color of in code so any color can be used. So I have only one texture.. want to be able to change the color of in code so any color can be used. So I have only one texture that basically has luminance. I've been using glColor4f 1f 0f 0f 1f to apply the color. Every blendfunc I've tried that has come close to working ends.. blendfunc I've tried that has come close to working ends up like the last picture below. I still want to preserve luminance like in the middle picture. This is like the Overlay or Soft Light filters in Photoshop if the color layer was on top of..

Determining Image Luminance/Brightness

http://stackoverflow.com/questions/4876315/determining-image-luminance-brightness

image out of it. It can be CGImage UIImage or just raw data CMSampleBufferRef . What I'm trying to do is to calculate luminance brightness of that data image . Or it can be some other value that can indicate me how bright the input light is. Is there..

How to draw a color wheel in objective-c

http://stackoverflow.com/questions/5108921/how-to-draw-a-color-wheel-in-objective-c

value. This is not exactly what you're trying to do looks like it's just hue varies in the circle with a constant luminance saturation but you should be able to adapt it for your needs. Note that this may not have optimal performance but it should.. NULL 0 CFDataSetLength bitmapData dim dim 4 generateColorWheelBitmap CFDataGetMutableBytePtr bitmapData dim luminance UIImage image createUIImageWithRGBAData bitmapData self.bounds.size.width self.bounds.size.height CFRelease bitmapData image.. float outG float outB float temp1 temp2 float temp 3 int i Check for saturation. If there isn't any just return the luminance value for each which results in gray. if s 0.0 outR l outG l outB l return Test for luminance and compute temporary values..

Decode video frames on iPhone GPU

http://stackoverflow.com/questions/9332807/decode-video-frames-on-iphone-gpu

I'm looking for the fastest way to decode a local mpeg 4 video's frames on the iPhone. I'm simply interested in the luminance values of the pixels in every 10th frame. I don't need to render the video anywhere. I've tried ffmpeg AVAssetReader ImageAssetGenerator.. input. You could probably set up the session to deliver frames in Y UV form rather than RGB where the Y component is luminance. Failing that it would be a pretty simple matter to write a shader that would convert RGB values for each pixel to luminance..

Converting a UIImage black'n white and not grayscale for using tesseract

http://stackoverflow.com/questions/9992078/converting-a-uiimage-blackn-white-and-not-grayscale-for-using-tesseract

imageFromCurrentlyProcessedOutput You can just pass your color image into this because this automatically extracts the luminance from each pixel and applies the threshold to that. Any pixel above the threshold goes to white and any one below that is..