GraphiteEditor / GraphiteEditor/Graphite
Node to cut an image out from its background and un-blend the translucent pixels
- Ngôn ngữ chính
- Rust
- Star
- 27.2k
- Fork
- 1.3k
- Merge trung bình
- 20 giờ 5 phút
- Pull request đã merge (30 ngày)
- 57
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Không có tệp, kiểm thử hoặc điểm vào nào được nêu tên. Hãy bắt đầu bằng cách tìm các quy ước xử lý hình ảnh node-graph hiện có và xác nhận cách các node khai báo đầu vào hình ảnh, nền và mặt nạ; công việc hoàn tất khi node mới tạo ra một tiền cảnh với độ trong suốt đã tô và loại bỏ phần đóng góp của nền khỏi các pixel bán trong suốt như được mô tả trong các ví dụ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- computer-graphics
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100