Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
17
Task/Bitmap-Histogram/Ada/bitmap-histogram-1.adb
Normal file
17
Task/Bitmap-Histogram/Ada/bitmap-histogram-1.adb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
type Pixel_Count is mod 2**64;
|
||||
type Histogram is array (Luminance) of Pixel_Count;
|
||||
|
||||
function Get_Histogram (Picture : Grayscale_Image) return Histogram is
|
||||
Result : Histogram := (others => 0);
|
||||
begin
|
||||
for I in Picture'Range (1) loop
|
||||
for J in Picture'Range (2) loop
|
||||
declare
|
||||
Count : Pixel_Count renames Result (Picture (I, J));
|
||||
begin
|
||||
Count := Count + 1;
|
||||
end;
|
||||
end loop;
|
||||
end loop;
|
||||
return Result;
|
||||
end Get_Histogram;
|
||||
Loading…
Add table
Add a link
Reference in a new issue