IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#107 closed defect (fixed)

psImagePixelInterpolate prototype definition tweaks

Reported by: robert.desonia@… Owned by: eugene
Priority: high Milestone:
Component: math Version: unspecified
Severity: normal Keywords: PSLib
Cc:

Description

I have a few small issues/questions/suggestions regarding the specification of
psImagePixelInterpolate.

  1. the input image should probably be qualified as const.
  1. should not the return type to psF64, given it is a valid operation for psF64

imagery and there is no real need for the reduction in precision here?

  1. I'd like to add a parameter for the value returned if x,y is not in the image

area. That is a great help for psImageRotate (ref: psImageRotate's 'exposed'
parameter).

  1. FYI: In implementing this beast, I made specific (inline) private functions

for every type/mode combination (to increase performance by avoiding nested
switch statement in loops, etc.). Not sure if you'd want them in the Doxygen
documentation or not. Their definition is currently as follows:

#define p_psImagePixelInterpolateFcns(TYPE) \
inline psF64 p_psImagePixelInterpolateFLAT_##TYPE( \

const psImage *input, \
float x, \
float y, \
psF64 unexposedValue \

); \
inline psF64 p_psImagePixelInterpolateBILINEAR_##TYPE( \

const psImage *input, \
float x, \
float y, \
psF64 unexposedValue \

);

The suggested new prototype for psImagePixelInterpolate is:

psF64 psImagePixelInterpolate(

const psImage *input,
float x,
float y,
psF64 unexposedValue,
psImageInterpolateMode mode

);

Change History (6)

comment:1 by robert.desonia@…, 22 years ago

Also, I need to define this operation for complex (which is required since
psImageRotate is defined for complex). Shall I just treat the real and
imaginary planes as two independent F32/F64 planes?

I'll assume this to be the preferred means to handle complex data for
interpolation unless you say otherwise.

-rdd

comment:2 by eugene, 22 years ago

Status: newassigned

your suggestions, etc, all sound fine to me. I'll update our docs.

comment:3 by eugene, 22 years ago

Resolution: fixed
Status: assignedclosed

adjusted in SDRS (not in v.05)

comment:4 by Paul Price, 22 years ago

Keywords: VERIFIED added

The prototype for psImagePixelInterpolate in the SDRS-06 is:

psC64 psImagePixelInterpolate (const psImage *input, float x, float y, psC64
unexposedValue, psImageInterpolateMode mode);

In order for the function to be able to handle complex images, it needs a psC64
unexposedValue and a psC64 return type. Note that this differs slightly from
the suggestion RdS made, and from the implementation in rel2.

comment:5 by robert.desonia@…, 22 years ago

bug_group: IPP-doc?PSLib?
Component: PSLib SDRSmath
Keywords: VERIFIED removed
product: IPP-docPSLib
Resolution: fixed
Status: closedreopened

Please assign things that deal with code variations from the SDRS to me in the
PSLib product.

comment:6 by Paul Price, 22 years ago

Resolution: fixed
Status: reopenedclosed

OK, bug #147.

Note: See TracTickets for help on using tickets.