blob: de9f8930126cb047760a5ebf4bd6944c8fe41a21 [file] [log] [blame]
cristy29dc8652015-05-12 16:26:21 +00001<!DOCTYPE html>
cristy44443b92015-05-05 00:06:07 +00002<html lang="en">
cristy06f63f22012-10-31 00:50:07 +00003<head>
cristy44443b92015-05-05 00:06:07 +00004 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
cristyffb69ed2010-12-25 00:06:48 +00007 <title>ImageMagick: MagickCore, C API for ImageMagick: Segment an Image with Thresholding Fuzzy c-Means</title>
cristy44443b92015-05-05 00:06:07 +00008 <meta http-equiv="content-language" content="en-US">
9 <meta http-equiv="content-type" content="text/html; charset=utf-8">
10 <meta http-equiv="reply-to" content="magick-users@imagemagick.org">
11 <meta name="application-name" content="ImageMagick">
12 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.">
13 <meta name="application-url" content="http://www.imagemagick.org">
14 <meta name="generator" content="PHP">
15 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, segment, an, image, with, thresholding, fuzzy, c-means, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert">
16 <meta name="rating" content="GENERAL">
17 <meta name="robots" content="INDEX, FOLLOW">
18 <meta name="generator" content="ImageMagick Studio LLC">
19 <meta name="author" content="ImageMagick Studio LLC">
20 <meta name="revisit-after" content="2 DAYS">
21 <meta name="resource-type" content="document">
cristy2f563d42015-05-06 23:36:51 +000022 <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC">
cristy44443b92015-05-05 00:06:07 +000023 <meta name="distribution" content="Global">
24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
cristy2f563d42015-05-06 23:36:51 +000025 <link rel="icon" href="../images/wand.png">
26 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon">
27 <link rel="stylesheet" href="../css/bootstrap.min.css">
28 <link rel="stylesheet" href="../css/magick.css">
cristy06f63f22012-10-31 00:50:07 +000029</head>
30
cristy44443b92015-05-05 00:06:07 +000031<body>
cristy06f63f22012-10-31 00:50:07 +000032<div class="main">
cristy44443b92015-05-05 00:06:07 +000033<div class="magick-masthead">
34 <div class="container">
35 <script type="text/javascript">
36 <!--
37 google_ad_client = "pub-3129977114552745";
38 google_ad_slot = "5439289906";
39 google_ad_width = 728;
40 google_ad_height = 90;
41 //-->
42 </script>
43 <center><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
44 </script></center>
45 <nav class="magick-nav">
cristy2f563d42015-05-06 23:36:51 +000046 <a class="magick-nav-item " href="../index.html">Home</a>
cristyea2793e2015-05-31 16:52:26 +000047 <a class="magick-nav-item " href="../binary-releases.html">Download</a>
cristy38185362015-05-07 20:09:56 +000048 <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
49 <a class="magick-nav-item " href="../command-line-options.html">Options</a>
cristyea2793e2015-05-31 16:52:26 +000050 <a class="magick-nav-item " href="../resources.html">Resources</a>
51 <a class="magick-nav-item " href="api.html">Develop</a>
cristya1890f02015-05-15 23:32:44 +000052 <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
53 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristy44443b92015-05-05 00:06:07 +000054 </nav>
55 </div>
56</div>
57<div class="container">
cristy4e638cd2015-05-07 16:47:40 +000058<div class="magick-header">
cristy44443b92015-05-05 00:06:07 +000059<p class="text-center"><a href="segment.html#SegmentImage">SegmentImage</a></p>
cristy06f63f22012-10-31 00:50:07 +000060
cristy20398432011-08-11 01:31:50 +000061<h2><a href="http://www.imagemagick.org/api/MagickCore/segment_8c.html" id="SegmentImage">SegmentImage</a></h2>
cristy20398432011-08-11 01:31:50 +000062
63<p>SegmentImage() segment an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy C-means technique.</p>
64
65<p>The format of the SegmentImage method is:</p>
66
cristy44443b92015-05-05 00:06:07 +000067<pre class="text">
68MagickBooleanType SegmentImage(Image *image,
69 const ColorspaceType colorspace,const MagickBooleanType verbose,
cristy82a2ff22015-05-12 16:41:32 +000070 const double cluster_threshold,const double smooth_threshold)
cristy20398432011-08-11 01:31:50 +000071</pre>
72
73<p>A description of each parameter follows.</p>
74
cristy44443b92015-05-05 00:06:07 +000075<dt>image</dt>
cristy20398432011-08-11 01:31:50 +000076<p>the image.</p>
77
cristy44443b92015-05-05 00:06:07 +000078<dt>colorspace</dt>
cristy20398432011-08-11 01:31:50 +000079<p>Indicate the colorspace.</p>
80
cristy44443b92015-05-05 00:06:07 +000081<dt>verbose</dt>
cristy20398432011-08-11 01:31:50 +000082<p>Set to MagickTrue to print detailed information about the identified classes.</p>
83
cristy44443b92015-05-05 00:06:07 +000084<dt>cluster_threshold</dt>
cristy20398432011-08-11 01:31:50 +000085<p>This represents the minimum number of pixels contained in a hexahedra before it can be considered valid (expressed as a percentage).</p>
86
cristy44443b92015-05-05 00:06:07 +000087<dt>smooth_threshold</dt>
cristy20398432011-08-11 01:31:50 +000088<p>the smoothing threshold eliminates noise in the second derivative of the histogram. As the value is increased, you can expect a smoother second derivative.</p>
89
cristy06f63f22012-10-31 00:50:07 +000090</div>
cristy44443b92015-05-05 00:06:07 +000091 <footer class="magick-footer">
cristy82a2ff22015-05-12 16:41:32 +000092 <div class="magick-nav-item pull-left">
cristy38185362015-05-07 20:09:56 +000093 <a href="../support.html">Donate</a>
cristy44443b92015-05-05 00:06:07 +000094 </div>
cristy38185362015-05-07 20:09:56 +000095 <p><a href="../sitemap.html">Sitemap</a>
96 <a href="../links.html">Related</a>
cristy44443b92015-05-05 00:06:07 +000097 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Image Studio</a>
cristyea2793e2015-05-31 16:52:26 +000098 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
cristy44443b92015-05-05 00:06:07 +000099</p>
100 <p><a href="segment.html#">Back to top</a>
cristyea2793e2015-05-31 16:52:26 +0000101 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristyabed55c2015-05-06 17:07:00 +0000102 <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
cristya1890f02015-05-15 23:32:44 +0000103 <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
cristy44443b92015-05-05 00:06:07 +0000104 </footer>
105</div><!-- /.container -->
cristy06f63f22012-10-31 00:50:07 +0000106
cristy44443b92015-05-05 00:06:07 +0000107 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
cristy2f563d42015-05-06 23:36:51 +0000108 <script src="../js/bootstrap.min.js"></script>
cristy44443b92015-05-05 00:06:07 +0000109 <script type="text/javascript">
cristy82a2ff22015-05-12 16:41:32 +0000110 /* <![CDATA[ */
cristy44443b92015-05-05 00:06:07 +0000111 (function() {
112 var s = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
113 s.type = 'text/javascript';
114 s.async = true;
115 s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
116 t.parentNode.insertBefore(s, t);
117 })();
cristy82a2ff22015-05-12 16:41:32 +0000118 /* ]]> */
cristy44443b92015-05-05 00:06:07 +0000119 </script>
cristy44cbd482013-08-04 20:53:36 +0000120</div>
cristy06f63f22012-10-31 00:50:07 +0000121</body>
cristy5a367e42015-05-05 12:39:18 +0000122</html>