IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#546 closed defect (fixed)

psImageGrowMask

Reported by: robert.desonia@… Owned by: Paul Price
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc: David.Robbins@…

Description

Does this function not operate on image masks? If so, why is psU16 introduced in the prototype at all?
If a mask is required to be U16, shouldn't the psMaskType is redefined to that?

The SDRS states the growVal and maskVal are not of type psMaskType, but psU16 so that they match
the maximum required type for the in image. It doesn't, however, state why the allowed in image would
not be of psMaskType in the first place.

Also, if in is not of psMaskType, is it not really a mask image then? If it isn't a mask, then do we then
need the mask of the in image too to perform a mask growth properly?

-rdd

Change History (4)

comment:1 by Paul Price, 21 years ago

Resolution: fixed
Status: newclosed

You know, I thought that was crystal clear to me when I wrote it, but now I have
no idea. Let's make them psMaskType.

psImage *psImageGrowMask(psImage *out, const psImage *in, psMaskType maskVal,

unsigned int growSize, psMaskType growVal);

comment:2 by robert.desonia@…, 21 years ago

Cc: david.robbins@… added

comment:3 by David.Robbins@…, 21 years ago

Resolution: fixed
Status: closedreopened

Got some more questions on ImageGrowMask...
does the out image data get set to that of the in image if it is unchanged? For
example, if a NULL out image is allocated, do you want to set the unGrown pixels
to that of in? If out is not NULL, do you want to leave the unGrown pixels as
whatever values they were previously, regardless of the in values?

Also, I assumed that when the SDRS says, "...within growSize pixels (either
horizontal or vertical) of a pixel which matches the maskVal shall have the
corresponding pixel in the out image set to the growValue.", that matches
referred to ==, and set to growValue refers to =. Robert has informed that he
believes this to mean that matches here referes to &=, and setting growValues
refers to |=. Consequently, any pixels within a growSize radius from all
nonzero "matches" get "set". Is this correct?

comment:4 by Paul Price, 21 years ago

Resolution: fixed
Status: reopenedclosed

If out is NULL, then a new psImage is allocated, with new pixels. So the result
is a deep copy, followed by a grow.

Robert has the correct interpretation of matching and setting.

Note: See TracTickets for help on using tickets.