https://doi.org/10.5201/ipol.2020.245
Raw File
Tip revision: 5f23fb0b6e1d50d996ac54daaa7e637e5d8decaf authored by Software Heritage on 05 May 2020, 00:00:00 UTC
ipol: Deposit 1363 in collection ipol
Tip revision: 5f23fb0
ccproc.h
/*
* ccproc.h
*
* Copyright (C) 2019, Enric Meinhardt-Llopis, CMLA, ÉNS Paris-Saclay.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

int ccproc(
    int *out_size,          // total size of each CC
    int *out_bdsize,        // boundary size of each CC
    int *out_all,           // array of all the indexes, connected
    int *out_first,         // array of first indexes of each CC
    int *out_idx,           // image with the indices of each region
    float *x, int w, int h, // input image
    int (eq)(float,float)   // input equivalence relation
);                              // return value = number of components

int bfollow(
    int *out_boundary,      // (x,y) coordinates along boundary
    float *x, int w, int h, // input image
    int (eq)(float,float),  // input equivalence relation
    int i, int j            // pixel inside the CC to follow
);                              // return value = length of boundary

int float_equality(float a, float b);
int floatnan_equality(float a, float b);
int float_eq_isnan(float a, float b);
back to top