18 #ifndef PIC_ALGORITHMS_REGION_BORDER_HPP 19 #define PIC_ALGORITHMS_REGION_BORDER_HPP 23 #include "../base.hpp" 24 #include "../image.hpp" 38 std::set<int> *ret =
new std::set<int>;
39 std::set<int>::iterator it;
41 for(it = coordsBorder->begin(); it != coordsBorder->end(); it++) {
47 if(img->
data[c] > 1.0f &&
48 coordsBorder->find(c) == coordsBorder->end()) {
54 if(img->
data[c] > 1.0f &&
55 coordsBorder->find(c) == coordsBorder->end()) {
61 if(img->
data[c] > 1.0f &&
62 coordsBorder->find(c) == coordsBorder->end()) {
68 if(img->
data[c] > 1.0f &&
69 coordsBorder->find(c) == coordsBorder->end()) {
87 std::set<int> *ret =
new std::set<int>;
90 ret->insert(coordsBorder->begin(), coordsBorder->end());
92 for(
int i = 0; i < widthBorder; i++) {
93 std::set<int> *tmpBorder =
setBorder(img, ret);
94 ret->insert(tmpBorder->begin(), tmpBorder->end());
void reverseAddress(int ind, int &x, int &y)
reverseAddress computes (x, y) given a memory address
Definition: image.hpp:680
float * data
data is the main buffer where pixel values are stored.
Definition: image.hpp:91
PIC_INLINE std::set< int > * setBorderNth(Image *img, std::set< int > *coordsBorder, int widthBorder)
setBorderNth
Definition: region_border.hpp:84
PIC_INLINE std::set< int > * setBorder(Image *img, std::set< int > *coordsBorder)
setBorder
Definition: region_border.hpp:34
int getAddress(int x, int y)
getAddress calculates a memory address from (x, y)
Definition: image.hpp:650
#define PIC_INLINE
Definition: base.hpp:33
The Image class stores an image as buffer of float.
Definition: image.hpp:60
Definition: bilateral_separation.hpp:25