Image blending functions

버전 2.27.2 (11.2 MB) 작성자: DGM
Image blending & compositing with support for 4D images, influence scaling, and several uncommon modes

다운로드 수: 1.3K

업데이트 날짜: 2022/9/30

GitHub에서 호스트

GitHub에서 라이선스 보기

These tools effect image blending and masking functionality common in image manipulation applications such as GIMP, Krita, or Photoshop. For a layered image composition GUI based on this functionality, see the parent toolbox linked below.
================== BLENDING FUNCTION ==================
IMBLEND() can blend images or imagesets as one would blend layers in GIMP or Photoshop. See 'help imblend'
I assert that if nothing else, IMBLEND() stands as the single most comprehensive collection and demonstration of blend mode math from GIMP, ImageMagick, Photoshop, Krita, and elsewhere.
Inputs are image arrays of same H,V dimension; both can be single images or 4-D imagesets of equal length.
-- Mismatches of dimensions 1:2 are not supported. Use IMRESIZE, IMCROP, or PADARRAY
 to enforce desired colocation of layer content.
-- Mismatches of dimension 3:4 are handled by array expansion.
User can optionally specify compositing method independently of the blend method.
Unlike other image manipulation software, most blend and composition modes have been made parametric. This useful feature may allow the user to tailor the influence of blends in a manner which cannot be acheived using mixdown opacity, or control density/thresholding behavior in composition modes. See the synopsis for details.
This collection of blend modes is comprehensive; if a mode is not on this list, it is likely equivalent to one of the modes that is. The list of supported mode synonyms is in the synopsis.
Submission thumbnail shows contour plots for the majority of the non-component blend modes. Included in the zip file is a PDF containing this sheet as well as parameter sweeps and documentation of mathematical properties and relationships among modes.
COMPOSITION MODES:
  • gimp compatibility (default)
  • translucent
  • dissolve (8 variants)
  • src over
  • src atop
  • src in
  • src out
  • dst over
  • dst atop
  • dst in
  • dst out
  • xor
BLEND MODES:
██ Bidirectional Modes
==== Contrast & Mixing ====
  • softlight (5 variants)
  • overlay
  • hard light
  • linear light
  • vivid light
  • easy light
  • flat light (3 variants)
  • mean light (2 variants)
  • super light
  • star light
  • moon light (2 variants)
  • pin light
  • hard mix (3 variants)
  • fog lighten
  • fog darken
==== Penumbrae ====
  • penumbra A (3 variants)
  • penumbra B (3 variants)
==== Quadratics ====
  • glow
  • heat
  • reflect
  • freeze
  • frect
  • reeze
  • helow
  • gleat
==== Mean-Scaled ====
  • scale add
  • scale mult
  • contrast
██ Unidirectional Complementary Pairs
==== Dodges & Burns ====
  • color dodge & burn
  • poly dodge & burn
  • linear dodge & burn
  • easy dodge & burn
  • gamma dodge & burn
  • suau dodge & burn
  • maleki dodge & burn
==== Hybrid Glow & Shadow ====
  • flat glow & shadow
  • mean glow & shadow
  • star glow & shadow
  • moon glow & shadow (2 variants)
==== Krita/EB Assortment ====
  • tint & shade
  • lighteneb & darkeneb
██ Relational
  • lighten RGB
  • darken RGB
  • lighten Y
  • darken Y
  • saturate
  • desaturate
  • most sat
  • least sat
  • near
  • far
  • replace
  • preserve
██ Mathematic & Technical
  • multiply
  • screen
  • divide
  • addition
  • subtraction
  • bleach
  • stain
  • difference
  • phoenix
  • exclusion
  • negation
  • sqrtdiff
  • average
  • agm
  • geometric
  • ghm
  • harmonic
  • interpolate
  • hard int
  • pnorm
  • arctan
  • curves
  • gammalight
  • gammadark
  • grain extract
  • grain merge
██ Mesh Modes
  • mesh
  • bomb
  • bomblocked
  • hard bomb
██ Selected Mesh Presets
  • lcd
  • +4 others
██ Modulo Modes
  • mod
  • mod shift
  • mod divide
  • cmod
  • cmod shift
  • cmod divide
██ Component
  • hue
  • saturation
  • color (5 variants)
  • value
  • luma
  • lightness
  • intensity
  • transfer inchan>outchan (directly transfer any channel to another)
  • permute inchan>H (rotate hue)
  • permute inchan>HS (rotate hue and blend saturation)
██ Specialty Modes
  • recolor {colormodel}
  • blurmap {kernel}
================== MASKING FUNCTION ==================
Also included is REPLACEPIXELS() which effects an opacity blending similar to GIMP's 'Layer Mask' functionality. Accepts two input images and a mask. Foreground image may be replaced by a color triplet for convenience. REPLACEPIXELS() supports multichannel and multiframe masks, and can support NaN throughput if mask is logical. REPLACEPIXELS() can optionally perform masking in linear RGB.
Archive includes support functions for image conversion and typecasting. IP Toolbox is not required.
Documentation with commentary, example code, and input/output images is available here:
This is part of my image manipulation toolbox:

인용 양식

DGM (2022). Image blending functions (https://github.com/291ce4321ac/MIMT-blend-tools/releases/tag/v2.27.2), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.