[Blindmath] grayscale braille

Richard Baldwin baldwin at dickbaldwin.com
Thu Mar 22 14:30:48 UTC 2012


PS: In the previous post I wrote:

"When you do this, you must be careful to avoid causing individual color
values to exceed 255 and also avoid causing individual color values to go
negative. If that happens, "integer wrap around" can occur and corrupt the
image."

I'm speculating that this may be part of what is happening when Pranav
writes:

"...The higher the contrast, the better I can distinguish objects. However,
I remember that too high a contrast distorted the image but I will have to
double check this."

Regardless of the "fix" that is employed, moving the distribution too far
to the right will clearly distort a digital image. If the color values are
clipped at 255, the distribution will develop a spike at 255. If the color
values are not clipped, integer wrap around will occur and distort the
distribution in other very complicated ways.

Dick Baldwin

On Thu, Mar 22, 2012 at 9:09 AM, Richard Baldwin <baldwin at dickbaldwin.com>wrote:

> Here are my ideas on contrast and brightness as it relates to color
> images. The same ideas also apply to gray scale images but I have never
> done much work with gray scale images.
>
> By the way, as you will see below, digital images provides a very good
> source of data for the study of statistical distributions, correlation,
> convolution, Fourier transforms, etc..
>
> Using a typical RGBA color model, the color values for red, green, and
> blue must fall within the range of 0 to 255. Therefore, we can compute and
> display a probability distribution or histogram of color values for any
> image. (Such a histogram could easily be displayed on swell paper, an
> embosser, or with the vOICe software.)
>
> If that distribution is narrow, a photographer might say that the image
> has poor contrast or is "washed out." To a sighted person, the image might
> not be very interesting. To a student of statistics, the histogram might be
> very interesting.
>
> If the narrow histogram falls mainly on the low side of the range from 0
> to 255, a photographer might say that the image is too dark in addition to
> having poor contrast. If the narrow histogram falls mainly on the high side
> of the range, the photographer might say that the image is too bright.
>
> By using a tool like Photoshop, (or by writing your own program which I
> prefer), you can change the brightness by adding a constant to or
> subtracting a constant from all of the color values. This will cause the
> location of the histogram to move horizontally within the range but won't
> modify its shape.
>
> When you do this, you must be careful to avoid causing individual color
> values to exceed 255 and also avoid causing individual color values to go
> negative. If that happens, "integer wrap around" can occur and corrupt the
> image.
>
> By using a tool like Photoshop, (or by writing your own program), you can
> increase or decrease the contrast by widening or narrowing the
> distribution. Widening the distribution will increase the contrast while
> narrowing the distribution will reduce the contrast. You can do this by:
>
> 1. Computing the mean value for all of the color values and subtracting
> the mean from every color value. This causes the distribution to have a new
> mean value of zero. (In this operation, you must be storing the color
> values in a format that allows negative values, such as a floating point
> array.)
> 2. Multiplying each modified color value by a factor that is less than or
> greater than 1.0. This will narrow or widen the distribution, but it will
> still have a mean value of zero and the shape will simply be stretched or
> compressed horizontally.
> 3. Adding the mean value back to each modified color value. This will move
> the mean of the distribution back to its original position within the range
> from 0 to 255.
> 4. Assuring that all color values are still within the range from 0 to 255
> inclusive before converting them to 8-bit integers. Set all negative color
> values to zero and set all color values that exceed 255 to 255.
>
> At this point, the digital image will have more or less contrast than at
> the beginning, but the brightness won't have been changed. If you need to
> change the brightness, go back and add or subtract a constant from each
> color value.
>
> I won't get into correlation, convolution, and Fourier transforms with
> regard to images at this time, but would be happy to do so if anyone is
> interested.
>
> Dick Baldwin
>
> Given a large number of pixels
>
>
> On Thu, Mar 22, 2012 at 4:10 AM, Michael Whapples <mwhapples at aim.com>wrote:
>
>> Contrast might or might not relate to changes in colour, particularly as
>> far as the voice is concerned if I understand how the voice works.
>>
>> To explain now, I understand the voice is using a form of grayscale
>> representation. I know you can apply a particular colour filter, but this
>> even so is a form of grayscale. I understand the voice only gives you a
>> level of intensity (IE. how loud the sound is) and in the case of colour
>> filter mode it is only measuring the intensity of one colour rather than
>> them all.
>>
>> The colour filter mode actually makes me think of an early electronic
>> magnifier system I used. The magnifier system had a black and white camera
>> in it, so output on the screen was grayscale. However the magnifier system
>> used LEDs to illuminate the page being viewed, however the manufacturer had
>> used red LEDs and therefore one was unable to read red text on a white
>> background as red reflected the red light just as well as the white
>> background and therefore the gray level used was the same for both. Equally
>> one could not necessarily see the difference between blue and green when
>> viewing the grayscale of the magnifier system as both of those would
>> reflect the red light  equally poorly.
>>
>> Anyway back to contrast, the intensity is just one dimension where things
>> may contrast. If the viewer has colour information as well then differences
>> in that may also be contrasting, but if one has thrown that information
>> away in creating a grayscale image then changes in colours will not
>> contrast.
>>
>> I think the contrast of changes in colours is what Richard Baldwin's tool
>> for enhancing diagrams for the blind is detecting and showing. That is why
>> you only get outlines of objects in his tool as the boundary is where there
>> is a colour contrast.
>>
>> I am not fully sure, but I think some of what you mention on very high
>> contrast images distorting the image, may be something to do with how it
>> appears to the viewer. I know some find having the pure white background
>> for text can be a bit glaring, I think this is to do with the eye recieving
>> so much light that it is hard to see the small amounts of black. Whether
>> that is just a problem for how the eye works I don't know.
>>
>> Whether distortions happen to images on cameras I don't know, however
>> there are many digital cameras which might try and do some autocorrection
>> and so might be tricked into doing something which isn't quite right for
>> what the operator would desire. Images with large amounts of very light
>> stuff and large areas which are quite dark could be difficult as a short
>> exposure time may loose detail in the dark sections and a long exposure
>> time may lead to the bright sections being over exposed.
>>
>> So may be high contrasts in intensity can give problems.
>>
>>
>> Michael Whapples
>>
>> -----Original Message----- From: Pranav Lal
>> Sent: Thursday, March 22, 2012 1:36 AM
>>
>> To: 'Blind Math list for those interested in mathematics'
>> Subject: Re: [Blindmath] grayscale braille
>>
>> Hi all,
>>
>> I do not know colors perceptually. However, One comparatively rare
>> circumstance where color in a tactile image may be important is if the
>> blind
>> person is presenting to a group of sighted persons. I have frequently been
>> to conferences where people display graphs and talk about the blue line
>> representing such and such variable. I say this is rare for blind people
>> since I do not know how many blind people keep tactile diagrams with them
>> when making such presentations.
>>
>> When we talk about changes in color, are we talking about contrast? If so,
>> then I have experienced this with the vOICe. The higher the contrast, the
>> better I can distinguish objects. However, I remember that too high a
>> contrast distorted the image but I will have to double check this.
>>
>> Pranav
>>
>>
>> ______________________________**_________________
>> Blindmath mailing list
>> Blindmath at nfbnet.org
>> http://nfbnet.org/mailman/**listinfo/blindmath_nfbnet.org<http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org>
>> To unsubscribe, change your list options or get your account info for
>> Blindmath:
>> http://nfbnet.org/mailman/**options/blindmath_nfbnet.org/**
>> mwhapples%40aim.com<http://nfbnet.org/mailman/options/blindmath_nfbnet.org/mwhapples%40aim.com>
>>
>> ______________________________**_________________
>> Blindmath mailing list
>> Blindmath at nfbnet.org
>> http://nfbnet.org/mailman/**listinfo/blindmath_nfbnet.org<http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org>
>> To unsubscribe, change your list options or get your account info for
>> Blindmath:
>> http://nfbnet.org/mailman/**options/blindmath_nfbnet.org/**
>> baldwin%40dickbaldwin.com<http://nfbnet.org/mailman/options/blindmath_nfbnet.org/baldwin%40dickbaldwin.com>
>>
>
>
>
> --
> Richard G. Baldwin (Dick Baldwin)
> Home of Baldwin's on-line Java Tutorials
> http://www.DickBaldwin.com
>
> Professor of Computer Information Technology
> Austin Community College
> (512) 223-4758
> mailto:Baldwin at DickBaldwin.com
> http://www.austincc.edu/baldwin/
>



-- 
Richard G. Baldwin (Dick Baldwin)
Home of Baldwin's on-line Java Tutorials
http://www.DickBaldwin.com

Professor of Computer Information Technology
Austin Community College
(512) 223-4758
mailto:Baldwin at DickBaldwin.com
http://www.austincc.edu/baldwin/



More information about the BlindMath mailing list