Conditional (computer programming): Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>ClueBot NG
m Reverting possible vandalism by 190.90.35.20 to version by Gilliam. False positive? Report it. Thanks, ClueBot NG. (0) (Bot)
 
→‎Arithmetic if: IBM704 has three-destination conditional branch op code. Some suggest that from IBM704 came FoUrtran....
 
Line 1: Line 1:
{{Redirect|Greyscale|the film|Greyscale (film)}}
<br><br>Detailed car dealers in NJ, are the most effective car dealers in Nj. For example, notice the professionalism of the car dealers in Nj. This is easy to do. For starters, if they are hired, a new well-respected dealership, it is mostly a safe bet that they are highly reputable themselves. Selecting a new or pre-owned car is no small investment. Make sure the car dealers in NJ are knowledgeable. Come prepared with questions that suited your wishes. The best car dealers in NJ are happy to help. Exterior lights knowledgeable automobile dealers in NJ would be higher probabilities of a successful sales technique.<br><br>Standard features on the Tundra include automatic limited-slip differential and vehicle stability control with traction suppress. All 4x4 Tundras come with toyota tundra off road electronic part-time four-wheel drive systems. This will satisfy both work and recreational activities.<br><br>So does that mean since Toyota makes the Prius it gives them carte blanche to saddle toyota tundra tuning entire world with this automotive hippopotamus? Really, in the event you option your 2009 Sequoia with gray paint in order to look as a hippo or a rhinoceros. How, exactly, did the Toyota styling department actually create an SUV that seems it has giant, rolling love handles anyway?<br><br>Traveling furthermore have a parent wondering about backseat room and leg space. Chrysler makes a van the Town and Country which has road trips in mind. It has a feature that allows the chairs to swivel and face each some other. That can allow for four people to hold their rotating chairs around for the goal of stretching out, socializing and playing exercises.<br><br>The functions of the vehicle include overhead and side seat mounted airbags, 4-wheel ABS anti lock brakes and Proactive Roll Avoidance Stability manipulation.<br><br>Tundra, a full-size pick up truck which replaced the T100, is made larger than its forerunners. This is utilized to respond preferable to the truckers needs. 2007 Tundra was introduced at the recently concluded Chicago Auto Show. Power [http://devolro.com/specifications supercar] areas of the body include the eight-foot bed and a 165-inch wheelbase. Engine options include a 4.0 L V6, 3.7 L V8, and 5.7 L V8.<br><br>Fourth, consider ease of installation. You will want simple, smooth process does not require drilling or special [http://devolro.com/interior off road]. Seek fast installation using basically screwdriver and screws.<br><br>Buyers of Salt Lake City new cars and trucks will appreciate the refinement in this pickup. "Refined pickup" - not really an oxymoron. Let me explain. The Tundra is available in regular and Limited trims and buyers can opt for the SR5 upgrade package and Work Truck package.
{{Distinguish|Gray code}}
{{Color depth}}
{{grayscale}}
 
In [[photography]] and [[computing]], a '''grayscale''' or '''greyscale''' [[digital image]] is an image in which the value of each [[pixel]] is a single [[sample (signal)|sample]], that is, it carries only [[Luminous intensity|intensity]] information. Images of this sort, also known as [[black-and-white]], are composed exclusively of shades of [[gray]], varying from black at the weakest intensity to white at the strongest.<ref>{{cite book | title = Stephen Johnson on Digital Photography | author = Stephen Johnson | publisher = O'Reilly | year = 2006 | isbn = 0-596-52370-X | url = http://books.google.com/books?id=0UVRXzF91gcC&pg=PA17&dq=grayscale+black-and-white-continuous-tone&ei=XlwqSdGVOILmkwTalPiIDw }}</ref>
 
Grayscale images are distinct from one-bit bi-tonal black-and-white images, which in the context of computer imaging are images with only the two [[color]]s, [[black]], and [[white]] (also called ''bilevel'' or ''[[binary image]]s'').  Grayscale images have many shades of gray in between. Grayscale  images are also called [[monochromatic]], denoting the presence of only one (mono) color (chrome).
 
Grayscale images are often the result of measuring the intensity of light at each pixel in a single band of the [[electromagnetic spectrum]] (e.g. [[infrared]], [[visible spectrum|visible light]], [[ultraviolet]], etc.), and in such cases they are monochromatic proper when only a given [[frequency]] is captured. But also they can be synthesized from a full color image; see the section about converting to grayscale.
 
==Numerical representations==
[[File:Grayscale 8bits palette sample image.png|thumb|left|An example grayscale image.]]
The intensity of a pixel is expressed within a given range between a minimum and a maximum, inclusive. This range is represented in an abstract way as a range from 0 (total absence, black) and 1 (total presence, white), with any fractional values in between. This notation is used in academic papers, but this does not define what "black" or "white" is in terms of [[colorimetry]].
 
Another convention is to employ [[percentage]]s, so the scale is then from 0% to 100%. This is used for a more intuitive approach, but if only [[integer]] values are used, the range encompasses a total of only 101 intensities, which are insufficient to represent a broad gradient of grays. Also, the percentile notation is used in [[printing]] to denote how much ink is employed in [[halftoning]], but then the scale is reversed, being 0% the paper white (no ink) and 100% a solid black (full ink).
 
In computing, although the grayscale can be computed through [[rational numbers]], image pixels are stored in [[Binary code|binary]], [[Quantization (signal processing)|quantized]] form. Some early grayscale monitors can only show up to sixteen (4-[[bit]]) different shades, but today grayscale images (as photographs) intended for visual display (both on screen and printed) are commonly stored with 8 bits per sampled pixel, which allows 256 different intensities (i.e., shades of gray) to be recorded, typically on a [[gamma correction|non-linear scale]]. The precision provided by this format is barely sufficient to avoid visible banding [[compression artifact|artifacts]], but very convenient for programming due to the fact that a single pixel then occupies a single [[byte]].
 
Technical uses (e.g. in [[medical imaging]] or [[remote sensing]] applications) often require more levels, to make full use of the [[sensor]] accuracy (typically 10 or 12 bits per sample) and to guard against roundoff errors in computations. Sixteen bits per sample (65,536 levels) is a convenient choice for such uses, as computers manage 16-bit [[Word (data type)|word]]s efficiently. The [[Tagged Image File Format|TIFF]] and the [[Portable Network Graphics|PNG]] (among other) [[image file formats]] support 16-bit grayscale natively, although browsers and many imaging programs tend to ignore the low order 8 bits of each pixel.
 
No matter what pixel [[Color depth|depth]] is used, the binary representations assume that 0 is black and the maximum value (255 at 8 bpp, 65,535 at 16 bpp, etc.) is white, if not otherwise noted.
 
==Converting color to grayscale==
Conversion of a color image to grayscale is not unique; different weighting of the color channels effectively represent the effect of shooting black-and-white film with different-colored [[photographic filter]]s on the cameras.
 
===Colorimetric (luminance-preserving) conversion to grayscale===
A common strategy is to use the principles of [[photometry (optics)|photometry]] or, more broadly, [[colorimetry]] to match the [[luminance (relative)|luminance]] of the grayscale image to the luminance of the original color image.<ref>Poynton, Charles A. "Rehabilitation of gamma." Photonics West'98 Electronic Imaging. International Society for Optics and Photonics, 1998. [http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=936787 online]</ref><ref>Charles Poynton, [http://poynton.com/notes/video/Constant_luminance.html Constant Luminance]</ref>  This also ensures that both images will have the same [[Luminance|absolute luminance]], as can be measured in its [[SI]] units of  [[candela per square metre|candelas per square meter]], in any given area of the image, given equal [[whitepoint]]s.  In addition, matching luminance provides matching perceptual [[Lightness#Relationship_between_lightness.2C_value.2C_and_luminance|lightness measures]], such as {{math|''L''<sup>*</sup>}} (as in the 1976 CIE [[Lab_color_space#CIELAB|''L''ab color space]]) which is determined by the luminance {{math|''Y''}} (as in the [[CIE 1931 color space|CIE 1931 ''XYZ'' color space]]) .
 
To convert a color from a colorspace based on an [[RGB color model]] to a grayscale representation of its luminance, [[weighted sum]]s must be calculated in a linear RGB space, that is, after the [[gamma correction|gamma compression]] function has been removed first via gamma expansion.<ref>Bruce Lindbloom, [http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html RGB Working Space Information] ([http://web.archive.org/web/20131002132220/http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html retrieved 2013-10-02])</ref>
 
For the [[sRGB]] color space,  gamma expansion is defined as
:<math>C_\mathrm{linear}=
\begin{cases}\frac{C_\mathrm{srgb}}{12.92}, & C_\mathrm{srgb}\le0.04045\\
\left(\frac{C_\mathrm{srgb}+0.055}{1.055}\right)^{2.4}, & C_\mathrm{srgb}>0.04045
\end{cases}
</math>
 
where {{math|''C''<sub>srgb</sub>}} represents any of the three gamma-compressed sRGB primaries ({{math|''R''<sub>srgb</sub>}}, {{math|''G''<sub>srgb</sub>}}, and {{math|''B''<sub>srgb</sub>}}, each in range [0,1]) and {{math|''C''<sub>linear</sub>}} is the corresponding linear-intensity value ({{math|''R''}}, {{math|''G''}}, and {{math|''B''}}, also in range [0,1]). Then, luminance is calculated as a weighted sum of the three linear-intensity values. The [[sRGB]] color space is defined in terms of the [[CIE 1931 color space|CIE 1931]] linear luminance {{math|''Y''}}, which is given by
 
:<math>Y = 0.2126 R + 0.7152 G + 0.0722 B</math>.<ref>Michael Stokes, Matthew Anderson, Srinivasan Chandrasekar, and Ricardo Motta, "A Standard Default Color Space for the Internet - sRGB", [http://www.w3.org/Graphics/Color/sRGB online] see matrix at end of Part 2.</ref>
 
The coefficients represent the measured intensity perception of typical [[trichromat]] humans, depending on the primaries being used; in particular, human vision is most sensitive to green and least sensitive to blue. To encode grayscale intensity in linear RGB, each of the three primaries can be set to equal the calculated linear luminance {{math|''Y''}} (replacing R,G,B by Y,Y,Y to get this linear grayscale). Linear luminance typically needs to be [[gamma correction|gamma compressed]] to get back to a conventional non-linear representation. For sRGB, each of its three primaries is then set to the same gamma-compressed {{math|''Y''<sub>srgb</sub>}} given by the inverse of the gamma expansion above as
 
:<math>Y_\mathrm{srgb}=\begin{cases}
12.92\ Y, & Y \le 0.0031308\\
1.055\ Y^{1/2.4}-0.055, & Y > 0.0031308.
\end{cases}
</math>
 
In practice, because the three sRGB components are then equal, it is only necessary to store these values once in sRGB-compatible image formats that support a single-channel representation. Web browsers and other software that recognizes sRGB images will typically produce the same rendering for a such a grayscale image as it would for an sRGB image having the same values in all three color channels.
 
===Luma coding in video systems===
{{Main|luma (video)}}
 
For images in color spaces such as [[Y'UV]] and its relatives, which are used in standard color TV and video systems such as [[PAL]], [[SECAM]], and [[NTSC]], a nonlinear [[luma (video)|luma]] component {{math|(''Y&#39;'')}} is calculated directly from gamma-compressed primary intensities as a weighted sum, which can be calculated quickly without the gamma expansion and compression used in colorimetric grayscale calculations. In the [[Y'UV]] and [[YIQ|Y'IQ]] models used by PAL and NTSC, the [[Rec. 601|rec601]] [[luma (video)|luma]] {{math|(''Y&#39;'')}} component is computed as
:<math>Y' =  0.299 R' + 0.587 G' + 0.114 B'</math>
where we use the prime to distinguish these gamma-compressed values from the linear R, G, B, and Y discussed above.  The [[Rec. 709|ITU-R BT.709]] standard used for [[High-definition television|HDTV]] developed by the [[Advanced Television Systems Committee standards|ATSC]] uses different color coefficients, computing the luma component as
:<math>Y' =  0.2126 R' + 0.7152 G' + 0.0722 B'</math>.
Although these are numerically the same coefficients used in sRGB above, the effect is different  because here they are being applied directly to gamma-compressed values.
 
Normally these colorspaces are transformed back to R'G'B' before rendering for viewing. To the extent that enough precision remains, they can then be rendered accurately.
 
But if the luma component by itself is instead used directly as a grayscale representation of the color image, luminance is not preserved: two colors can have the same luma {{math|''Y&#39;''}} but different CIE linear luminance {{math|''Y''}} (and thus different nonlinear {{math|''Y''<sub>srgb</sub>}} as defined above) and therefore appear darker or lighter to a typical human than the original color.  Similarly, two colors having the same luminance {{math|''Y''}} (and thus the same {{math|''Y''<sub>srgb</sub>}}) will in general have different luma by either of the {{math|''Y&#39;''}} luma definitions above.<ref>Charles Poynton, [http://poynton.com/PDFs/Mag_of_nonconst_luminance.pdf The magnitude of nonconstant luminance errors] in Charles Poynton, A Technical Introduction to Digital Video. New York: John WIley & Sons, 1996.</ref>
 
==Grayscale as single channels of multichannel color images==
 
Color images are often built of several stacked [[Channel (digital image)|color channel]]s, each of them representing value levels of the given channel. For example, [[RGB]] images are composed of three independent channels for red, green and blue [[primary color]] components; [[CMYK]] images have four channels for cyan, magenta, yellow and black [[Color printing|ink plates]], etc.
 
Here is an example of color channel splitting of a full RGB color image. The column at left shows the isolated color channels in natural colors, while at right there are their grayscale equivalences:
 
[[File:Beyoglu 4671 tricolor.png|thumb|400px|center|Composition of RGB from 3 Grayscale images]]
 
The reverse is also possible: to build a full color image from their separate grayscale channels. By mangling channels, using offsets, rotating and other manipulations, artistic effects can be achieved instead of accurately reproducing the original image.
 
==See also==
* [[Channel (digital image)]]
* [[Halftone]]
* [[Duotone]]
* [[False-color]]
* [[Sepia tone]]
* [[Cyanotype]]
* [[Morphological image processing]]
* [[Mezzotint]]
* [[List of monochrome and RGB palettes]] – [[List of monochrome and RGB palettes#Monochrome palettes|Monochrome palettes]] section
* [[List of software palettes]] – [[List of software palettes#Color gradient palettes|Color gradient palettes]] and [[List of software palettes#False color palettes|false color palettes]] sections
* [[Achromatopsia#Complete Achromatopsia|Achromatopsia]], total [[color blindness]], in which vision is limited to a grayscale.
* [[Zone System]]
 
==References==
{{reflist}}
 
[[Category:Imaging]]
[[Category:Color depths]]

Latest revision as of 05:46, 19 November 2014



Detailed car dealers in NJ, are the most effective car dealers in Nj. For example, notice the professionalism of the car dealers in Nj. This is easy to do. For starters, if they are hired, a new well-respected dealership, it is mostly a safe bet that they are highly reputable themselves. Selecting a new or pre-owned car is no small investment. Make sure the car dealers in NJ are knowledgeable. Come prepared with questions that suited your wishes. The best car dealers in NJ are happy to help. Exterior lights knowledgeable automobile dealers in NJ would be higher probabilities of a successful sales technique.

Standard features on the Tundra include automatic limited-slip differential and vehicle stability control with traction suppress. All 4x4 Tundras come with toyota tundra off road electronic part-time four-wheel drive systems. This will satisfy both work and recreational activities.

So does that mean since Toyota makes the Prius it gives them carte blanche to saddle toyota tundra tuning entire world with this automotive hippopotamus? Really, in the event you option your 2009 Sequoia with gray paint in order to look as a hippo or a rhinoceros. How, exactly, did the Toyota styling department actually create an SUV that seems it has giant, rolling love handles anyway?

Traveling furthermore have a parent wondering about backseat room and leg space. Chrysler makes a van the Town and Country which has road trips in mind. It has a feature that allows the chairs to swivel and face each some other. That can allow for four people to hold their rotating chairs around for the goal of stretching out, socializing and playing exercises.

The functions of the vehicle include overhead and side seat mounted airbags, 4-wheel ABS anti lock brakes and Proactive Roll Avoidance Stability manipulation.

Tundra, a full-size pick up truck which replaced the T100, is made larger than its forerunners. This is utilized to respond preferable to the truckers needs. 2007 Tundra was introduced at the recently concluded Chicago Auto Show. Power supercar areas of the body include the eight-foot bed and a 165-inch wheelbase. Engine options include a 4.0 L V6, 3.7 L V8, and 5.7 L V8.

Fourth, consider ease of installation. You will want simple, smooth process does not require drilling or special off road. Seek fast installation using basically screwdriver and screws.

Buyers of Salt Lake City new cars and trucks will appreciate the refinement in this pickup. "Refined pickup" - not really an oxymoron. Let me explain. The Tundra is available in regular and Limited trims and buyers can opt for the SR5 upgrade package and Work Truck package.