IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 21, 2005, 4:32:00 PM (21 years ago)
Author:
drobbin
Message:

Added psVectorGet/Set and tests. Added prototype for psImageCountPixelMask.

File:
1 edited

Legend:

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

    r4970 r5089  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-09-08 00:07:59 $
     11 *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-09-22 02:32:00 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    250250  Output:
    251251  Internal Data Structures:
    252     chebPolys[i][j] 
    253     sums[i][j]: This will contain the sum of 
     252    chebPolys[i][j]
     253    sums[i][j]: This will contain the sum of
    254254                input->data.F32[x][y] *
    255255                psPolynomial1DEval(
     
    258258                psPolynomial1DEval(
    259259chebPolys[j],
    260 (float) y, 
     260(float) y,
    261261);
    262262        over all pixels (x,y) in the image.
     
    373373  Output:
    374374  Internal Data Structures:
    375     chebPolys[i][j] 
    376     sums[i][j]: This will contain the sum of 
     375    chebPolys[i][j]
     376    sums[i][j]: This will contain the sum of
    377377                input->data.F32[x][y] *
    378378                psPolynomial1DEval(
     
    381381                psPolynomial1DEval(
    382382chebPolys[j],
    383 (float) y, 
     383(float) y,
    384384);
    385385        over all pixels (x,y) in the image.
     
    514514
    515515/*****************************************************************************
    516 XXX: Use static variables for Chebyshev polynomials and scaling factors. 
     516XXX: Use static variables for Chebyshev polynomials and scaling factors.
    517517 *****************************************************************************/
    518518psImage* p_psImageEvalPolynomialCheb(psImage* input,
     
    634634}
    635635
     636// count number of pixels with given mask value
     637long psImageCountPixelMask (psImage *mask,
     638                            psMaskType value)
     639{
     640    long Npixels = 0;
     641
     642    for (long i = 0; i < mask->numRows; i++) {
     643        for (long j = 0; j < mask->numCols; j++) {
     644            if (mask->data.U8[i][j] & value) {
     645                Npixels ++;
     646            }
     647        }
     648    }
     649    return (Npixels);
     650}
     651
Note: See TracChangeset for help on using the changeset viewer.