52 if (I.getSize() == 0) {
67 for (
unsigned int i = 0; i < I.getHeight(); i++) {
68 for (
unsigned int j = 0; j < I.getWidth(); j++) {
69 mask[i + 1][j + 1] = 255 - I[i][j];
75 for (
unsigned int i = 0; i < marker.
getHeight(); i++) {
76 if (i == 0 || i == marker.
getHeight() - 1) {
77 for (
unsigned int j = 0; j < marker.
getWidth(); j++) {
83 marker[i][marker.
getWidth() - 1] = 255;
88 reconstruct(marker, mask, I_reconstruct, connexity);
90 for (
unsigned int i = 0; i < I.getHeight(); i++) {
91 for (
unsigned int j = 0; j < I.getWidth(); j++) {
92 I[i][j] = 255 - I_reconstruct[i + 1][j + 1];
99 for (
unsigned int i = 0; i < I.getHeight(); i++) {
100 memcpy(flood_fill_mask[i + 1] + 1, I[i],
sizeof(
unsigned char) * I.
getWidth());
108 for (
unsigned int i = 0; i < mask.
getHeight(); i++) {
109 memcpy(mask[i], flood_fill_mask[i + 1] + 1,
sizeof(
unsigned char) * mask.
getWidth());
VISP_EXPORT void floodFill(vpImage< unsigned char > &I, const vpImagePoint &seedPoint, const unsigned char oldValue, const unsigned char newValue, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)
VISP_EXPORT void reconstruct(const vpImage< unsigned char > &marker, const vpImage< unsigned char > &mask, vpImage< unsigned char > &h_kp1, const vpImageMorphology::vpConnexityType &connexity=vpImageMorphology::CONNEXITY_4)