Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
ImageTools[Mask] - mask the intensity of an image with another image
Calling Sequence
Mask( img, mask )
Parameters
img
-
Image; image to be masked
mask
Image; transparency mask
Description
The Mask command uses one image as an intensity mask for another image.
The img parameter specifies the image to be masked.
The mask parameter specifies the mask. It must be the same size as img.
The Mask operation consists of multiplying each pixel in img by the corresponding pixel in mask, and writing the result to the output image. This operation is commutative; interchanging the image and mask returns the same result.
Pixels with a value of 1.0 in the mask cause the corresponding img pixel to be copied verbatim into the output. Pixels of value 0.0 in the mask result in 0.0 in the output, regardless of the value of the corresponding image pixel.
For example, consider a mask M that gradually transitions from 1.0 on the left to 0.0 on the right. Using the Mask command with this mask and an image A produces an image that looks like A on the left, and becomes black on the right. Masking image B with the complement of M, , produces an image that looks like B on the right, and fades to black on the left.
Combining these two images by simple addition, , yields an image that fades from A to B as you move from left to right.
Any two images can be masked together. Where one image is lighter, the other shows through more, and vice-versa.
Masking a GrayImage with a ColorImage results in a ColorImage.
Masking a GrayImage with a ColorAImage results in a ColorAImage.
Masking a ColorImage with a ColorAImage results in a ColorAImage with alpha layer intensity equal to zero.
Examples
0.0 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.0 1.0
-8.0 -8.0 -8.0 -4.8 -1.6 1.6 4.8 8.0 8.0 8.0
See Also
ImageTools, ImageTools[Convolution]
Download Help Document