IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17329


Ignore:
Timestamp:
Apr 4, 2008, 4:46:10 PM (18 years ago)
Author:
Paul Price
Message:

Shouldn't multiply by the maskVal --- it's set to 1 or zero.
Shouldn't free output image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageConvolve.c

    r17320 r17329  
    77/// @author Eugene Magnier, IfA
    88///
    9 /// @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
    10 /// @date $Date: 2008-04-04 22:44:56 $
     9/// @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
     10/// @date $Date: 2008-04-05 02:46:10 $
    1111///
    1212/// Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    418418    int numRows = mask->numRows, numCols = mask->numCols; // Size of image
    419419
    420     if (!psMemIncrRefCounter(out)) {
    421         out = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
    422     }
    423 
    424420    psImage *onoff = psImageAlloc(numCols, numRows, PS_TYPE_F32); // Pixels on or off
    425421    psImageInit(onoff, 0);
     
    439435    if (!convolved) {
    440436        psError(PS_ERR_UNKNOWN, false, "Unable to convolve mask.");
    441         psFree(out);
    442437        return NULL;
    443438    }
    444 
    445     thresh *= maskVal;
    446439
    447440    if (!setVal) {
     
    449442    }
    450443
     444    if (!out) {
     445        out = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
     446    }
    451447    for (int y = 0; y < numRows; y++) {
    452448        for (int x = 0; x < numCols; x++) {
     
    457453
    458454    psFree(convolved);
    459     psFree(out);
    460455
    461456    return out;
Note: See TracChangeset for help on using the changeset viewer.