Anonymous user
Grayscale image: Difference between revisions
m
Link to base article
(Added R code) |
m (Link to base article) |
||
Line 379:
=={{header|J}}==
Color bitmap structure and basic methods for manipulating with it are described [[Basic_bitmap_storage#J|here]].
Grayscale image is stored as two-dimensional array of luminance values.▼
▲Grayscale image is stored as two-dimensional array of luminance values. Allowed
<lang j>
NB. converts the image to grayscale according to formula
NB. L = 0.2126*R + 0.7152*G + 0.0722*B
toGray=:
NB. converts grayscale image to the color image, with all channels equal
Line 391 ⟶ 393:
</lang>
Example:
<lang j>
|