Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Bitmap-Histogram/Ada/bitmap-histogram-1.ada
Normal file
17
Task/Bitmap-Histogram/Ada/bitmap-histogram-1.ada
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