Debian Codegraph @

www/multispectral-imagery.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 4 — not the installed (fully patched) source.
4 Debian patches touch this file
1
2
3
4 <!DOCTYPE html>
5 <html lang="en" data-bs-theme="dark">
6 <head>
7 <meta charset="utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
9
10 <!-- Title and Description -->
11 <title>ImageMagick | Multispectral Imagery</title>
12 <meta name="description" content="ImageMagick is a powerful open-source software suite for creating, editing, converting, and manipulating images in over 200 formats. Ideal for developers, designers, and researchers." />
13
14 <!-- Canonical URL -->
15 <link rel="canonical" href="multispectral-imagery.html" />
16
17 <!-- Robots -->
18 <meta name="robots" content="index, follow" />
19
20 <!-- Theme Color -->
21 <meta name="theme-color" content="#000000" />
22
23 <!-- Verification Tags -->
24 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
25
26 <!-- Favicon and Apple Icon -->
27 <link rel="shortcut icon" href="../images/wand.png" type="images/png" />
28 <link rel="apple-touch-icon" href="../images/wand.png" type="images/png" />
29
30 <!-- Preconnect for External Resources -->
31 <link rel="preconnect" href="../index.html" />
32
33 <!-- Stylesheets -->
34 <link rel="preload" href="assets/bootstrap.min.css" as="style" crossorigin="anonymous" />
35 <link rel="stylesheet" href="assets/bootstrap.min.css" />
36
37 <!-- Accessibility Enhancement -->
38 <style>
39 html {
40 scroll-padding-top: 70px;
41 }
42 </style>
43
44 <!-- Open Graph Meta Tags -->
45 <meta property="og:title" content="ImageMagick | Multispectral Imagery" />
46 <meta property="og:description" content="ImageMagick is a powerful open-source software suite for creating, editing, converting, and manipulating images in over 200 formats. Ideal for developers, designers, and researchers." />
47 <meta property="og:image" content="../images/logo.png" />
48 <meta property="og:logo" content="../images/logo.png" />
49 <meta property="og:url" content="../www/multispectral-imagery.html" />
50 <meta property="og:type" content="website" />
51 <meta property="og:site_name" content="ImageMagick" />
52 <meta property="og:locale" content="en_us" />
53
54 <!-- Twitter Card Meta Tags -->
55 <meta name="twitter:card" content="summary_large_image" />
56 <meta name="twitter:site" content="@imagemagick" />
57 <meta name="twitter:creator" content="@imagemagick" />
58 <meta name="twitter:title" content="ImageMagick | Multispectral Imagery" />
59 <meta name="twitter:description" content="ImageMagick is a powerful open-source software suite for creating, editing, converting, and manipulating images in over 200 formats. Ideal for developers, designers, and researchers." />
60 <meta name="twitter:image" content="../images/logo.png" />
61 <meta name="twitter:image:alt" content="ImageMagick logo and tag line" />
62
63 <!-- JSON-LD Structured Data -->
64 <script type="application/ld+json">
65 {
66 "@context": "https://schema.org",
67 "@type": "SoftwareApplication",
68 "name": "ImageMagick",
69 "url": "../www/multispectral-imagery.html",
70 "image": "../images/logo.png",
71 "description": "ImageMagick is a powerful open-source software suite for creating, editing, converting, and manipulating images in over 200 formats. Ideal for developers, designers, and researchers.",
72 "applicationCategory": "Multimedia",
73 "operatingSystem": "Windows, macOS, Linux, Unix",
74 "softwareVersion": "7.1.2-1",
75 "license": "../www/license.html",
76 "creator": {
77 "@type": "Organization",
78 "name": "ImageMagick Studio LLC",
79 "url": "https://imagemagick.org"
80 },
81 "keywords": [
82 "Multispectral Imagery",
83 "image processing software",
84 "image conversion tool",
85 "batch image editing",
86 "open-source image editor",
87 "ImageMagick command-line",
88 "resize images ImageMagick",
89 "crop and rotate images",
90 "ImageMagick tutorial",
91 "ImageMagick automation",
92 "ImageMagick for developers",
93 "ImageMagick CLI",
94 "ImageMagick filters and effects",
95 "ImageMagick scripting",
96 "ImageMagick API integration"
97 ],
98 "sameAs": [
99 "https://github.com/ImageMagick",
100 "https://x.com/imagemagick"
101 ],
102 "offers": {
103 "@type": "Offer",
104 "price": "0.00",
105 "priceCurrency": "USD"
106 }
107 }
108 </script>
109 <!-- Google Custom Search -->
110 </head>
111 <body>
112 <script>
113 function setTheme(theme) {
114 localStorage.setItem('theme', theme);
115 updateThemeIcon(theme);
116 document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? getSystemTheme() : theme);
117 }
118 function getSystemTheme() {
119 return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
120 }
121 function updateThemeIcon(theme) {
122 const iconMap = {
123 light: '☀️',
124 dark: '🌙',
125 auto: '🌓'
126 };
127 document.getElementById('currentThemeIcon').textContent = iconMap[theme] || '🌓';
128 }
129 document.addEventListener('DOMContentLoaded', () => {
130 const savedTheme = localStorage.getItem('theme') || 'auto';
131 setTheme(savedTheme);
132 });
133 </script>
134 <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
135 <div class="container-fluid">
136 <a class="navbar-brand fw-bold" href="../index.html" title="$meta->sitename;">
137 ImageMagick </a>
138 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation">
139 <span class="navbar-toggler-icon"></span>
140 </button>
141
142 <div class="collapse navbar-collapse" id="magick-navbars">
143 <ul class="navbar-nav me-auto">
144 <li class="nav-item">
145 <a class="nav-link " href="download.html">Download</a>
146 </li>
147 <li class="nav-item">
148 <a class="nav-link " href="../www/command-line-tools.html">Tools</a>
149 </li>
150 <li class="nav-item">
151 <a class="nav-link " href="command-line-processing.html">CLI</a>
152 </li>
153 <li class="nav-item">
154 <a class="nav-link " href="develop.html">Develop</a>
155 </li>
156 <li class="nav-item">
157 <a class="nav-link" rel="noopener" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
158 </li>
159 <li class="nav-item ms-4">
160 <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe>
161 </li>
162 </ul>
163 <ul class="navbar-nav ms-auto">
164 <li class="nav-item dropdown">
165 <form class="d-flex form-inline" action="../www/search.html">
166 <input class="form-control me-2" type="text" name="q" placeholder="Search" aria-label="Search">
167 <button class="btn btn-outline-success" type="submit" name="sa">Search</button>
168 </form>
169 </li>
170 <li class="nav-item dropdown ms-2">
171 <a class="nav-link dropdown-toggle" href="#" id="themeDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
172 <span id="currentThemeIcon">🌓</span>
173 </a>
174 <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="themeDropdown">
175 <li><a class="dropdown-item" href="#" onclick="setTheme('light')">☀️ Light</a></li>
176 <li><a class="dropdown-item" href="#" onclick="setTheme('dark')">🌙 Dark</a></li>
177 <li><a class="dropdown-item" href="#" onclick="setTheme('auto')">🌓 Auto</a></li>
178 </ul>
179 </li>
180 </ul>
181 </div>
182 </div>
183 </nav>
184
185 <div class="col-lg-8 mx-auto text-body-secondary pt-5 pt-lg-5">
186 <header class="d-flex align-items-center pb-3 mb-5 border-bottom">
187 <div class="mt-3 ms-3">
188 <a href="../index.html" class="text-decoration-none">
189 <h1 class="fs-2 mb-1">Multispectral Imagery</h1>
190 </a>
191 <h2 class="fs-5 text-muted">ImageMagick</h2>
192 </div>
193 </header>
194
195 <main class="container">
196 <div>
197 <p class="lead">Multispectral imagery refers to images that are captured using multiple bands of the electromagnetic spectrum, beyond just the visible light spectrum. This means that they capture data across a wider range of wavelengths, from ultraviolet to infrared.</p>
198 <p>By capturing data across multiple spectral bands, multispectral imagery can provide additional information about the objects or scenes being imaged, such as their composition, temperature, and vegetation health. This information can be used for a wide range of applications, including agriculture, environmental monitoring, disaster response, and military surveillance.</p>
199 <p>Multispectral imagery is often captured using specialized sensors on satellites, drones, or aircraft. The data is then processed using specialized software to create images that display the information captured in each spectral band.</p>
200 <p>Overall, multispectral imagery provides a powerful tool for analyzing and understanding the world around us, allowing us to gain insights that would be impossible to obtain using visible light imagery alone.</p>
201 <h4>Multispectral Support in ImageMagick</h4>
202 <p>ImageMagick supports multispectral images where all channels have the same dimensions and number of pixels as the original image. However, not all image formats support multispectral images. PSD, TIFF, MIFF, MPC, and <a href="http://im.snibgo.com/fmttxt.htm">FTXT</a> have full support for multispectral images up to 31 bands with 21 meta channels. If you build ImageMagick with the configure script <samp>--enable-64bit-channel-masks</samp> option, you can process 62 band multispectral images with up to 52 meta channels.</p>
203 <p>We call image channels beyond the standard RGB(A) or CMYK(A) channels, "meta" channels. We label them as "meta", "meta1", "meta2", etc.. Meta channels are treated the same as any other channel meaning they can be read, written, and operated upon-- e.g., resized, gamma adjusted, etc.</p>
204 <h5>Create a Multispectral Image</h5>
205 <p>Begin with a multispectral image, typically in the TIFF or PSD format. If you don't have one, you can create your own. In our example, we create a single CMYK pixel with two meta channels. Stuff this in a file titled <code>multiMeta.txt</code>:</p>
206 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>0,0: 10,20,30,40,50,60</samp></pre>
207 <p>Let's convert that to the TIFF image format:</p>
208 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>$ magick -size 1x1 -colorspace CMYK -define ftxt:format="\x,\y:\c\n" -define ftxt:hasalpha=false -define ftxt:nummeta=2 ftxt:multiMeta.txt multiMeta.tif</samp></pre>
209 <p>Let confirm that worked as expected:<p>
210 <pre class="pre-scrollable p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>$ identify -verbose multiMeta.tif
211 Image:
212 Filename: multiMeta.tif
213 Permissions: rw-------
214 Format: TIFF (Tagged Image File Format)
215 Mime type: images/tiff
216 Class: DirectClass
217 Geometry: 1x1+0+0
218 Units: PixelsPerInch
219 Colorspace: CMYK
220 Type: ColorSeparation
221 Endianness: LSB
222 Depth: 16-bit
223 Channels: 6.2
224 Channel depth:
225 Cyan: 16-bit
226 Magenta: 16-bit
227 Yellow: 16-bit
228 Black: 16-bit
229 Meta channel[0]: 16-bit
230 Meta channel[1]: 16-bit
231 Channel statistics:
232 Pixels: 1
233 Cyan:
234 min: 10 (0.00015259)
235 max: 10 (0.00015259)
236 mean: 10 (0.00015259)
237 median: 10 (0.00015259)
238 standard deviation: 0 (0)
239 kurtosis: -3
240 skewness: 0
241 entropy: 0
242 Magenta:
243 min: 20 (0.00030518)
244 max: 20 (0.00030518)
245 mean: 20 (0.00030518)
246 median: 20 (0.00030518)
247 standard deviation: 0 (0)
248 kurtosis: -3
249 skewness: 0
250 entropy: 0
251 Yellow:
252 min: 30 (0.000457771)
253 max: 30 (0.000457771)
254 mean: 30 (0.000457771)
255 median: 30 (0.000457771)
256 standard deviation: 0 (0)
257 kurtosis: -3
258 skewness: 0
259 entropy: 0
260 Black:
261 min: 40 (0.000610361)
262 max: 40 (0.000610361)
263 mean: 40 (0.000610361)
264 median: 40 (0.000610361)
265 standard deviation: 0 (0)
266 kurtosis: -3
267 skewness: 0
268 entropy: 0
269 Meta channel[0]:
270 min: 50 (0.000762951)
271 max: 50 (0.000762951)
272 mean: 50 (0.000762951)
273 median: 50 (0.000762951)
274 standard deviation: 0 (0)
275 kurtosis: -3
276 skewness: 0
277 entropy: 0
278 Meta channel[1]:
279 min: 60 (0.000915541)
280 max: 60 (0.000915541)
281 mean: 60 (0.000915541)
282 median: 60 (0.000915541)
283 standard deviation: 0 (0)
284 kurtosis: -3
285 skewness: 0
286 entropy: 0
287 Image statistics:
288 Overall:
289 min: 10 (0.00015259)
290 max: 60 (0.000915541)
291 mean: 35 (0.000534066)
292 median: 35 (0.000534066)
293 standard deviation: 0 (0)
294 kurtosis: -1.79762
295 skewness: 4.44476e-15
296 entropy: 0
297 Total ink density: 0.15259%
298 Colors: 1
299 Histogram:
300 1: (10,20,30,40) #000A0014001E0028 cmyk(0.0389105,0.077821,0.116732,0.155642)
301 Rendering intent: Perceptual
302 Gamma: 0.454545
303 Chromaticity:
304 red primary: (0.64,0.33)
305 green primary: (0.3,0.6)
306 blue primary: (0.15,0.06)
307 white point: (0.3127,0.329)
308 Matte color: grey74
309 Background color: white
310 Border color: srgb(223,223,223)
311 Transparent color: black
312 Interlace: None
313 Intensity: Undefined
314 Compose: Over
315 Page geometry: 1x1+0+0
316 Dispose: Undefined
317 Iterations: 0
318 Compression: None
319 Orientation: TopLeft
320 Properties:
321 date:create: 2023-03-12T11:38:42+00:00
322 date:modify: 2023-03-12T11:38:42+00:00
323 date:timestamp: 2023-03-12T11:38:56+00:00
324 signature: c51848f16d296f7c95be14404cc582f49db6fd33f31b544a2ce10e440b3747b3
325 tiff:alpha: unspecified
326 tiff:endian: lsb
327 tiff:photometric: separated
328 tiff:rows-per-strip: 1
329 Artifacts:
330 verbose: true
331 Tainted: False
332 Filesize: 306B
333 Number pixels: 1
334 </samp></pre>
335 <p>Notice the channel depth and statistics associated with the two meta channels.<p>
336 <h5>Working with Multispectral Images</h5>
337 <p>Meta channels are treated the same as any other channel meaning they can be read, written, and operated upon-- e.g., resized, gamma adjusted, etc.. Here, we replace the first channel with the contents of the meta channel:<p>
338 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>magick multiMeta.tif -channel-fx 'meta1=>cyan' multiMeta-1.tif</samp></pre>
339 <p>The original cyan channel has an intensity of 10. It's now, per the channel FX instructions, 50.<p>
340 <p>And in this example, we create two meta channels:</p>
341 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>magick lena.png \( mandril3.jpg -colorspace gray \) -channel-fx '| gray=>meta' \( zelda1.jpg -colorspace gray \) -channel-fx '| gray=>meta1' meta.tif</samp></pre>
342 <p>In this example, we blend two meta channels into a single alpha channel:</p>
343 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>magick in.tiff -alpha opaque \( +clone -set colorspace sRGB -channel-fx "meta0=>red meta1=>green" \) -channel A -fx "(v.r+v.g)/2" +channel out.tiff</samp></pre>
344 <br/>
345 <h5>Writing Multispectral Images</h5>
346 <p>You can preserve multispectral images by writing them to a format that supports meta channels such as TIFF or PSD. If you write to other image formats that do not support multisprectal images, the channels are not preserved and instead lost-- e.g., PNG. In this example, we read, resize, and write a multispectral image:</p>
347 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><samp>magick multiMeta.tif -resize 50% resizedMeta.tif</samp></pre>
348 </div>
349 </main><!-- /.container -->
350 <footer class="text-center pt-5 my-5 text-body-secondary border-top">
351 <div class="container-fluid">
352 <a href="security-policy.html">Security</a> •
353 <a href="news.html">News</a>
354
355 <a href="#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico" /></a>
356
357 <a href="../www/links.html">Related</a> •
358 <a href="../www/sitemap.html">Sitemap</a>
359 <br>
360 <a href="../www/support.html">Sponsor</a> •
361 <a href="../www/cite.html">Cite</a> •
362 <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
363 <a href="../www/../www/https://imagemagick.org/script/contact.php">Contact Us</a>
364 <br>
365 <a href="https://github.com/imagemagick/imagemagick" rel="noopener" target="_blank" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg></a> •
366 <a href="https://twitter.com/imagemagick" rel="noopener" target="_blank" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 300 300" width="2%" height="2%" role="img" focusable="false"><title>Twitter</title><path d="M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66"/></svg></a>
367 <br>
368 <small>Copyright © 1999 ImageMagick Studio LLC</small>
369 </div>
370 </footer>
371 </div>
372
373 <!-- Javascript assets -->
374 <script src="assets/bootstrap.bundle.min.js" ></script>
375 </body>
376 </html>