1 -- File: Image_AveragePixelInterpolation.cdl
2 -- Created: Tue Jul 27 18:47:06 1993
3 -- Author: Jean Louis FRENKEL
5 ---Copyright: Matra Datavision 1993
8 class AveragePixelInterpolation from Image inherits PixelInterpolation from Image
10 ---Purpose: The class AveragePixelInterpolation is used to compute a SubPixel
11 -- value on non integer Image coordinate
12 -- AveragePixelInterpolation redefined a new method to compute a
14 -- SubPixel value is the average of the three nearest Pixel in
16 -- If V1, V2, V3, V4 is the value of the three nearest Image
17 -- Pixel V = ( V1+V2+V3 ) / 3 is the Image SubPixel value
18 -- on non integer coordinate (FX,FY)
25 ColorPixel from Aspect,
26 IndexPixel from Aspect,
27 DColorImage from Image,
28 DIndexedImage from Image
32 Create returns AveragePixelInterpolation from Image ;
34 ---Purpose: Create a AveragePixelInterpolation object.
36 Interpolate( me ; aImage : Image from Image ;
37 FX,FY : Real from Standard ;
38 LowerX,LowerY,UpperX,UpperY : Integer from Standard ;
39 RetPixel : in out Pixel from Aspect )
40 returns Boolean from Standard is redefined ;
42 ---Purpose: Redefined the method to compute SubPixel's value
43 -- on non integer Image coordinate.
44 -- LowerX,LowerY,UpperX,UpperY is the Image Min Max, it's use
45 -- check if the SubPixel coordinate FX,FY is outside of image.
46 -- Return True if Interpolation Succes.
47 -- Return False if the SubPixel is out from Image.
49 Interpolate( me ; aImage : DColorImage from Image ;
50 FX,FY : Real from Standard ;
51 LowerX,LowerY,UpperX,UpperY : Integer from Standard ;
52 RetPixel : in out ColorPixel from Aspect )
53 returns Boolean from Standard is redefined;
55 ---Purpose: Compute SubPixel's value on non integer Image coordinate for
56 -- DColorImage and ColorPixel.
57 -- LowerX,LowerY,UpperX,UpperY is the Image Min Max, it's use
58 -- check if the SubPixel coordinate FX,FY is outside of image.
59 -- Return True if Interpolation Succes.
60 -- Return False if the SubPixel is out from Image.
63 Interpolate( me ; aImage : DIndexedImage from Image ;
64 FX,FY : Real from Standard ;
65 LowerX,LowerY,UpperX,UpperY : Integer from Standard ;
66 RetPixel : in out IndexPixel from Aspect )
67 returns Boolean from Standard is redefined;
69 ---Purpose: Compute SubPixel's value on non integer Image coordinate for
70 -- DIndexedImage and IndexPixel.
71 -- LowerX,LowerY,UpperX,UpperY is the Image Min Max, it's use
72 -- check if the SubPixel coordinate X,Y is outside of image.
73 -- Return True if Interpolation Succes.
74 -- Return False if the SubPixel is out from Image.
76 end AveragePixelInterpolation from Image;