GraphiteEditor / GraphiteEditor/Graphite

Node to cut an image out from its background and un-blend the translucent pixels

オープン
#986 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
27.2k
フォーク
1.3k
平均マージ
20時間 5分
マージ済み PR(30日)
57

説明

This node would let you manually cut out a background by "un-premultiplying" the translucent pixels in an image. You feed it:
- The original image with both a foreground and background, where the translucency is "baked in"
- Only the background, without the foreground that's being cut out
- A mask that you paint

The node produces the foreground content cut out using the transparency of the painted mask, with the translucent pixels changed to "un-premultiply" the blending with the background pixels.

(This is sort of conceptually equivalent to un-baking the ambient occlusion from a photoscanned 3D model.)

Example 1:

1. Take a photo (locked in place with a tripod) of someone holding a translucent object and wearing a fuzzy vest
2. Have them leave the frame and shoot another photo of just the backdrop
3. The first photo has features of the backdrop blended into the colors of pixels where the translucent object and edges of the fuzzy vest are (the foreground's translucent pixels are "pre-multiplied" with the background).
4. Manually draw a mask where the translucent parts are some intermediate (gray) strength value.
5. Feed these three inputs into this node and get an output that applies the mask and recolors the translucent pixels to remove the background's color contribution.

Example 2:

1. Take an image with a perfectly solid background color, where you wish the image instead had a transparent background.
2. Pick the color of the background to use as the background image.
3. The original image has the background color contaminating the translucent pixel colors where both the foreground and background color blend to form the resulting color (in areas of anti-aliasing around edges or translucency of the object itself).
4. Make a mask for the object that accounts for the anti-aliased edges and any areas of translucency in the subject.
5. Feed these three inputs into this node and get an output that applies the mask and recolors the translucent pixels to remove the background's color contribution.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。