128 return((
int) (q->
area-(ssize_t) p->
area));
134 #define ConnectedComponentsImageTag "ConnectedComponents/Image" 178 connect4[2][2] = { { -1, 0 }, { 0, -1 } },
179 connect8[4][2] = { { -1, -1 }, { -1, 0 }, { -1, 1 }, { 0, -1 } },
191 assert(image != (
Image *) NULL);
200 if (component_image == (
Image *) NULL)
201 return((
Image *) NULL);
221 return((
Image *) NULL);
223 for (n=0; n < (ssize_t) (image->
columns*image->
rows); n++)
236 object[i].bounding_box.x=(ssize_t) image->
columns;
237 object[i].bounding_box.y=(ssize_t) image->
rows;
246 for (n=0; n < (ssize_t) (connectivity > 4 ? 4 : 2); n++)
250 dx=connectivity > 4 ? connect8[n][1] : connect4[n][1];
251 dy=connectivity > 4 ? connect8[n][0] : connect4[n][0];
252 for (y=0; y < (ssize_t) image->
rows; y++)
263 if (p == (
const Quantum *) NULL)
269 for (x=0; x < (ssize_t) image->
columns; x++)
287 if (((x+dx) < 0) || ((x+dx) >= (ssize_t) image->
columns) ||
288 ((y+dy) < 0) || ((y+dy) >= (ssize_t) image->
rows))
305 neighbor_offset=dy*image->
columns+dx;
313 oy=offset+neighbor_offset;
337 oy=offset+neighbor_offset;
354 for (y=0; y < (ssize_t) component_image->
rows; y++)
375 for (x=0; x < (ssize_t) component_image->
columns; x++)
392 if (x <
object[
id].bounding_box.
x)
393 object[id].bounding_box.x=x;
394 if (x >= (ssize_t)
object[
id].bounding_box.
width)
395 object[id].bounding_box.width=(size_t) x;
396 if (y <
object[
id].bounding_box.
y)
397 object[id].bounding_box.y=y;
398 if (y >= (ssize_t)
object[id].bounding_box.height)
399 object[
id].bounding_box.
height=(
size_t) y;
407 object[id].centroid.x+=x;
408 object[id].centroid.y+=y;
442 component_image->
colors=(size_t) n;
443 for (i=0; i < (ssize_t) component_image->
colors; i++)
445 object[i].bounding_box.width-=(
object[i].bounding_box.x-1);
446 object[i].bounding_box.height-=(
object[i].bounding_box.y-1);
454 object[i].centroid.x/=
object[i].area;
455 object[i].centroid.y/=
object[i].area;
456 max_threshold+=
object[i].area;
457 if (
object[i].area >
object[background_id].area)
463 if (artifact != (
const char *) NULL)
466 if (artifact != (
const char *) NULL)
471 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
472 for (i=0; i < (ssize_t) component_image->
colors; i++)
473 if (((
object[i].area < min_threshold) ||
474 (
object[i].area >= max_threshold)) && (i != background_id))
478 if (artifact != (
const char *) NULL)
486 for (i=0; i < (ssize_t) component_image->
colors; i++)
499 for (q=p; *q !=
'\0'; q++)
505 for (i=0; i < (ssize_t) component_image->
colors; i++)
514 if (artifact == (
const char *) NULL)
516 if (artifact != (
const char *) NULL)
521 for (i=0; i < (ssize_t) component_image->
colors; i++)
523 for (c=(
char *) artifact; *c !=
'\0'; )
525 while ((isspace((
int) ((
unsigned char) *c)) != 0) || (*c ==
','))
527 first=(ssize_t) strtol(c,&c,10);
529 first+=(ssize_t) component_image->
colors;
531 while (isspace((
int) ((
unsigned char) *c)) != 0)
535 last=(ssize_t) strtol(c+1,&c,10);
537 last+=(ssize_t) component_image->
colors;
539 step=(ssize_t) (first > last ? -1 : 1);
540 for ( ; first != (last+step); first+=step)
545 if (artifact != (
const char *) NULL)
558 sizeof(*top_objects));
565 (void) memcpy(top_objects,
object,component_image->
colors*
sizeof(*
object));
566 qsort((
void *) top_objects,component_image->
colors,
sizeof(*top_objects),
568 for (i=top_ids+1; i < (ssize_t) component_image->
colors; i++)
573 if (artifact != (
const char *) NULL)
592 for (q=p; *q !=
'\0'; q++)
598 for (i=0; i < (ssize_t) component_image->
colors; i++)
607 if (artifact == (
const char *) NULL)
609 if (artifact != (
const char *) NULL)
610 for (c=(
char *) artifact; *c !=
'\0'; )
615 while ((isspace((
int) ((
unsigned char) *c)) != 0) || (*c ==
','))
617 first=(ssize_t) strtol(c,&c,10);
619 first+=(ssize_t) component_image->
colors;
621 while (isspace((
int) ((
unsigned char) *c)) != 0)
625 last=(ssize_t) strtol(c+1,&c,10);
627 last+=(ssize_t) component_image->
colors;
629 step=(ssize_t) (first > last ? -1 : 1);
630 for ( ; first != (last+step); first+=step)
633 artifact=
GetImageArtifact(image,
"connected-components:perimeter-threshold");
634 if (artifact != (
const char *) NULL)
639 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
640 metrics[++n]=
"perimeter";
641 #if defined(MAGICKCORE_OPENMP_SUPPORT) 642 #pragma omp parallel for schedule(dynamic) shared(status) \ 643 magick_number_threads(component_image,component_image,component_image->colors,1) 645 for (i=0; i < (ssize_t) component_image->
colors; i++)
654 pattern[4] = { 1, 0, 0, 0 };
665 bounding_box=
object[i].bounding_box;
666 for (y=(-1); y < (ssize_t) bounding_box.
height+1; y++)
677 bounding_box.
y+y,bounding_box.
width+2,2,exception);
678 if (p == (
const Quantum *) NULL)
683 for (x=(-1); x < (ssize_t) bounding_box.
width+1; x++)
699 for (v=0; v < 2; v++)
704 for (u=0; u < 2; u++)
709 offset=v*(bounding_box.
width+2)*
713 if ((ssize_t) pixels[2*v+u] == i)
722 if ((((ssize_t) pixels[0] == i) &&
723 ((ssize_t) pixels[3] == i)) ||
724 (((ssize_t) pixels[1] == i) &&
725 ((ssize_t) pixels[2] == i)))
737 object[i].metric[n]=ceil(
MagickSQ1_2*pattern[1]+1.0*pattern[2]+
740 for (i=0; i < (ssize_t) component_image->
colors; i++)
741 if (((
object[i].metric[n] < min_threshold) ||
742 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
745 artifact=
GetImageArtifact(image,
"connected-components:circularity-threshold");
746 if (artifact != (
const char *) NULL)
751 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
752 metrics[++n]=
"circularity";
753 #if defined(MAGICKCORE_OPENMP_SUPPORT) 754 #pragma omp parallel for schedule(dynamic) shared(status) \ 755 magick_number_threads(component_image,component_image,component_image->colors,1) 757 for (i=0; i < (ssize_t) component_image->
colors; i++)
766 pattern[4] = { 1, 0, 0, 0 };
777 bounding_box=
object[i].bounding_box;
778 for (y=(-1); y < (ssize_t) bounding_box.
height; y++)
789 bounding_box.
y+y,bounding_box.
width+2,2,exception);
790 if (p == (
const Quantum *) NULL)
795 for (x=(-1); x < (ssize_t) bounding_box.
width; x++)
811 for (v=0; v < 2; v++)
816 for (u=0; u < 2; u++)
821 offset=v*(bounding_box.
width+2)*
825 if ((ssize_t) pixels[2*v+u] == i)
834 if ((((ssize_t) pixels[0] == i) &&
835 ((ssize_t) pixels[3] == i)) ||
836 (((ssize_t) pixels[1] == i) &&
837 ((ssize_t) pixels[2] == i)))
849 object[i].metric[n]=ceil(
MagickSQ1_2*pattern[1]+1.0*pattern[2]+
851 object[i].metric[n]=4.0*
MagickPI*
object[i].area/(
object[i].metric[n]*
852 object[i].metric[n]);
854 for (i=0; i < (ssize_t) component_image->
colors; i++)
855 if (((
object[i].metric[n] < min_threshold) ||
856 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
860 if (artifact != (
const char *) NULL)
865 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
866 metrics[++n]=
"diameter";
867 for (i=0; i < (ssize_t) component_image->
colors; i++)
869 object[i].metric[n]=ceil(sqrt(4.0*
object[i].area/
MagickPI)-0.5);
870 if (((
object[i].metric[n] < min_threshold) ||
871 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
875 artifact=
GetImageArtifact(image,
"connected-components:major-axis-threshold");
876 if (artifact != (
const char *) NULL)
881 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
882 metrics[++n]=
"major-axis";
883 #if defined(MAGICKCORE_OPENMP_SUPPORT) 884 #pragma omp parallel for schedule(dynamic) shared(status) \ 885 magick_number_threads(component_image,component_image,component_image->colors,1) 887 for (i=0; i < (ssize_t) component_image->
colors; i++)
901 centroid = { 0.0, 0.0 };
921 bounding_box=
object[i].bounding_box;
922 for (y=0; y < (ssize_t) bounding_box.
height; y++)
927 bounding_box.
y+y,bounding_box.
width,1,exception);
928 if (p == (
const Quantum *) NULL)
933 for (x=0; x < (ssize_t) bounding_box.
width; x++)
946 for (y=0; y < (ssize_t) bounding_box.
height; y++)
951 bounding_box.
y+y,bounding_box.
width,1,exception);
952 if (p == (
const Quantum *) NULL)
957 for (x=0; x < (ssize_t) bounding_box.
width; x++)
961 M11+=(x-centroid.
x)*(y-centroid.
y);
962 M20+=(x-centroid.
x)*(x-centroid.
x);
963 M02+=(y-centroid.
y)*(y-centroid.
y);
970 sqrt(4.0*M11*M11+(M20-M02)*(M20-M02))));
972 for (i=0; i < (ssize_t) component_image->
colors; i++)
973 if (((
object[i].metric[n] < min_threshold) ||
974 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
977 artifact=
GetImageArtifact(image,
"connected-components:minor-axis-threshold");
978 if (artifact != (
const char *) NULL)
983 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
984 metrics[++n]=
"minor-axis";
985 #if defined(MAGICKCORE_OPENMP_SUPPORT) 986 #pragma omp parallel for schedule(dynamic) shared(status) \ 987 magick_number_threads(component_image,component_image,component_image->colors,1) 989 for (i=0; i < (ssize_t) component_image->
colors; i++)
1003 centroid = { 0.0, 0.0 };
1023 bounding_box=
object[i].bounding_box;
1024 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1029 bounding_box.
y+y,bounding_box.
width,1,exception);
1030 if (p == (
const Quantum *) NULL)
1035 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1048 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1053 bounding_box.
y+y,bounding_box.
width,1,exception);
1054 if (p == (
const Quantum *) NULL)
1059 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1063 M11+=(x-centroid.
x)*(y-centroid.
y);
1064 M20+=(x-centroid.
x)*(x-centroid.
x);
1065 M02+=(y-centroid.
y)*(y-centroid.
y);
1072 sqrt(4.0*M11*M11+(M20-M02)*(M20-M02))));
1074 for (i=0; i < (ssize_t) component_image->
colors; i++)
1075 if (((
object[i].metric[n] < min_threshold) ||
1076 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
1080 "connected-components:eccentricity-threshold");
1081 if (artifact != (
const char *) NULL)
1086 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
1087 metrics[++n]=
"eccentricy";
1088 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1089 #pragma omp parallel for schedule(dynamic) shared(status) \ 1090 magick_number_threads(component_image,component_image,component_image->colors,1) 1092 for (i=0; i < (ssize_t) component_image->
colors; i++)
1106 centroid = { 0.0, 0.0 },
1107 ellipse_axis = { 0.0, 0.0 };
1127 bounding_box=
object[i].bounding_box;
1128 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1133 bounding_box.
y+y,bounding_box.
width,1,exception);
1134 if (p == (
const Quantum *) NULL)
1139 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1152 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1157 bounding_box.
y+y,bounding_box.
width,1,exception);
1158 if (p == (
const Quantum *) NULL)
1163 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1167 M11+=(x-centroid.
x)*(y-centroid.
y);
1168 M20+=(x-centroid.
x)*(x-centroid.
x);
1169 M02+=(y-centroid.
y)*(y-centroid.
y);
1176 sqrt(4.0*M11*M11+(M20-M02)*(M20-M02))));
1178 sqrt(4.0*M11*M11+(M20-M02)*(M20-M02))));
1179 object[i].metric[n]=sqrt(1.0-(ellipse_axis.y*ellipse_axis.y*
1182 for (i=0; i < (ssize_t) component_image->
colors; i++)
1183 if (((
object[i].metric[n] < min_threshold) ||
1184 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
1188 if (artifact != (
const char *) NULL)
1193 (void) sscanf(artifact,
"%lf%*[ -]%lf",&min_threshold,&max_threshold);
1194 metrics[++n]=
"angle";
1195 #if defined(MAGICKCORE_OPENMP_SUPPORT) 1196 #pragma omp parallel for schedule(dynamic) shared(status) \ 1197 magick_number_threads(component_image,component_image,component_image->colors,1) 1199 for (i=0; i < (ssize_t) component_image->
colors; i++)
1213 centroid = { 0.0, 0.0 };
1233 bounding_box=
object[i].bounding_box;
1234 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1239 bounding_box.
y+y,bounding_box.
width,1,exception);
1240 if (p == (
const Quantum *) NULL)
1245 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1258 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1263 bounding_box.
y+y,bounding_box.
width,1,exception);
1264 if (p == (
const Quantum *) NULL)
1269 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1273 M11+=(x-centroid.
x)*(y-centroid.
y);
1274 M20+=(x-centroid.
x)*(x-centroid.
x);
1275 M02+=(y-centroid.
y)*(y-centroid.
y);
1283 if (fabs(M11) < 0.0)
1285 if ((fabs(M20-M02) >= 0.0) && ((M20-M02) < 0.0))
1286 object[i].metric[n]+=90.0;
1291 if (fabs(M20-M02) >= 0.0)
1293 if ((M20-M02) < 0.0)
1294 object[i].metric[n]+=90.0;
1296 object[i].metric[n]+=180.0;
1300 if ((fabs(M20-M02) >= 0.0) && ((M20-M02) < 0.0))
1301 object[i].metric[n]+=90.0;
1303 for (i=0; i < (ssize_t) component_image->
colors; i++)
1304 if (((
object[i].metric[n] < min_threshold) ||
1305 (
object[i].metric[n] >= max_threshold)) && (i != background_id))
1313 for (i=0; i < (ssize_t) component_image->
colors; i++)
1323 if ((
object[i].merge ==
MagickFalse) || (i == background_id))
1328 for (j=0; j < (ssize_t) component_image->
colors; j++)
1330 bounding_box=
object[i].bounding_box;
1331 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1342 bounding_box.
y+y,bounding_box.
width,1,exception);
1343 if (p == (
const Quantum *) NULL)
1348 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1357 for (n=0; n < (ssize_t) (connectivity > 4 ? 4 : 2); n++)
1367 dx=connectivity > 4 ? connect8[n][1] : connect4[n][1];
1368 dy=connectivity > 4 ? connect8[n][0] : connect4[n][0];
1370 bounding_box.
y+y+dy,1,1,exception);
1371 if (p == (
const Quantum *) NULL)
1387 for (j=1; j < (ssize_t) component_image->
colors; j++)
1388 if (
object[j].census >
object[
id].census)
1391 for (y=0; y < (ssize_t) bounding_box.
height; y++)
1402 bounding_box.
y+y,bounding_box.
width,1,exception);
1408 for (x=0; x < (ssize_t) bounding_box.
width; x++)
1426 for (i=0; i < (ssize_t) component_image->
colors; i++)
1427 component_image->
colormap[i]=
object[i].color;
1429 (void)
SyncImage(component_image,exception);
1437 for (i=0; i < (ssize_t) component_image->
colors; i++)
1439 object[i].bounding_box.width=0;
1440 object[i].bounding_box.height=0;
1441 object[i].bounding_box.x=(ssize_t) component_image->
columns;
1442 object[i].bounding_box.y=(ssize_t) component_image->
rows;
1443 object[i].centroid.x=0;
1444 object[i].centroid.y=0;
1445 object[i].census=
object[i].area == 0.0 ? 0.0 : 1.0;
1449 for (y=0; y < (ssize_t) component_image->
rows; y++)
1461 if (p == (
const Quantum *) NULL)
1466 for (x=0; x < (ssize_t) component_image->
columns; x++)
1472 if (x <
object[
id].bounding_box.
x)
1473 object[id].bounding_box.x=x;
1474 if (x > (ssize_t)
object[id].bounding_box.width)
1475 object[
id].bounding_box.
width=(
size_t) x;
1476 if (y <
object[
id].bounding_box.
y)
1477 object[id].bounding_box.y=y;
1478 if (y > (ssize_t)
object[id].bounding_box.height)
1479 object[
id].bounding_box.
height=(
size_t) y;
1480 object[id].centroid.x+=x;
1481 object[id].centroid.y+=y;
1486 for (i=0; i < (ssize_t) component_image->
colors; i++)
1488 object[i].bounding_box.width-=(
object[i].bounding_box.x-1);
1489 object[i].bounding_box.height-=(
object[i].bounding_box.y-1);
1490 object[i].centroid.x=
object[i].centroid.x/
object[i].area;
1491 object[i].centroid.y=
object[i].centroid.y/
object[i].area;
1494 qsort((
void *)
object,component_image->
colors,
sizeof(*
object),
1502 "connected-components:exclude-header");
1505 (void) fprintf(stdout,
"Objects (");
1507 "connected-components:exclude-ids");
1509 (void) fprintf(stdout,
"id: ");
1510 (void) fprintf(stdout,
"bounding-box centroid area mean-color");
1511 for (j=0; j <= n; j++)
1512 (
void) fprintf(stdout,
" %s",metrics[j]);
1513 (void) fprintf(stdout,
"):\n");
1515 for (i=0; i < (ssize_t) component_image->
colors; i++)
1516 if (
object[i].census > 0.0)
1522 (void) fprintf(stdout,
" ");
1524 "connected-components:exclude-ids");
1526 (void) fprintf(stdout,
"%.20g: ",(
double)
object[i].id);
1527 (void) fprintf(stdout,
1528 "%.20gx%.20g%+.20g%+.20g %.1f,%.1f %.*g %s",(
double)
1529 object[i].bounding_box.width,(double)
1530 object[i].bounding_box.
height,(
double)
1531 object[i].bounding_box.x,(double)
object[i].bounding_box.
y,
1532 object[i].centroid.x,
object[i].centroid.y,
1534 for (j=0; j <= n; j++)
1536 object[i].metric[j]);
1537 (void) fprintf(stdout,
"\n");
1545 return(component_image);
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
MagickExport Image * ConnectedComponentsImage(const Image *image, const size_t connectivity, CCObjectInfo **objects, ExceptionInfo *exception)
MagickProgressMonitor progress_monitor
MagickExport MagickBooleanType SyncImage(Image *image, ExceptionInfo *exception)
static Quantum GetPixelAlpha(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
static Quantum GetPixelRed(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport const char * GetImageArtifact(const Image *image, const char *artifact)
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
#define MAGICKCORE_QUANTUM_DEPTH
MagickExport const Quantum * GetCacheViewVirtualPixels(const CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static long StringToLong(const char *magick_restrict value)
MagickExport MagickBooleanType GetMatrixElement(const MatrixInfo *matrix_info, const ssize_t x, const ssize_t y, void *value)
MagickExport void GetPixelInfo(const Image *image, PixelInfo *pixel)
MagickExport MagickBooleanType SetMatrixElement(const MatrixInfo *matrix_info, const ssize_t x, const ssize_t y, const void *value)
#define MagickCoreSignature
MagickExport Quantum * GetCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static double PerceptibleReciprocal(const double x)
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
MagickExport void GetColorTuple(const PixelInfo *pixel, const MagickBooleanType hex, char *tuple)
static Quantum GetPixelGreen(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport MagickBooleanType IsStringTrue(const char *value)
static void GetPixelInfoPixel(const Image *magick_restrict image, const Quantum *magick_restrict pixel, PixelInfo *magick_restrict pixel_info)
MagickExport int GetMagickPrecision(void)
static Quantum GetPixelIndex(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
static Quantum GetPixelBlack(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport Quantum * QueueCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
MagickExport MatrixInfo * AcquireMatrixInfo(const size_t columns, const size_t rows, const size_t stride, ExceptionInfo *exception)
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
MagickBooleanType(* MagickProgressMonitor)(const char *, const MagickOffsetType, const MagickSizeType, void *)
MagickExport MagickBooleanType QueryColorCompliance(const char *name, const ComplianceType compliance, PixelInfo *color, ExceptionInfo *exception)
static size_t GetPixelChannels(const Image *magick_restrict image)
MagickExport MagickBooleanType AcquireImageColormap(Image *image, const size_t colors, ExceptionInfo *exception)
char filename[MagickPathExtent]
#define GetMagickModule()
#define ThrowImageException(severity, tag)
MagickExport CacheView * AcquireVirtualCacheView(const Image *image, ExceptionInfo *exception)
static double RadiansToDegrees(const double radians)
MagickExport MagickBooleanType IsFuzzyEquivalencePixelInfo(const PixelInfo *p, const PixelInfo *q)
static void SetPixelIndex(const Image *magick_restrict image, const Quantum index, Quantum *magick_restrict pixel)
MagickExport void * RelinquishMagickMemory(void *memory)
static int CCObjectInfoCompare(const void *x, const void *y)
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
static Quantum GetPixelBlue(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
#define ConnectedComponentsImageTag
MagickExport Image * DestroyImage(Image *image)
MagickExport Image * CloneImage(const Image *image, const size_t columns, const size_t rows, const MagickBooleanType detach, ExceptionInfo *exception)
ColorspaceType colorspace
MagickExport MagickBooleanType SetImageProgress(const Image *image, const char *tag, const MagickOffsetType offset, const MagickSizeType extent)
MagickExport MatrixInfo * DestroyMatrixInfo(MatrixInfo *matrix_info)