Comments (3)
@asmorkalov
i provided more info about this ussue please reconcider
from opencv.
warpAffine applies interpolation to all channels, including alpha. It means, that alpha value on rectangle border is not strictly 0 or 255.
from opencv.
yes, but the problem is that when the background color is (255, 0, 0, 0) it is interpolating to red even though alpha is 0.
when image background is RGBA (0, 0, 0, 0)
when image background is RGBA (255, 0, 0, 0)
when image background is RGBA (0, 255, 0, 0)
background is fully transparent so it be (0, 0, 0, 0) or (255, 0, 0, 0) or (0, 255, 0, 0) should produce same results, the RGB channels should be ignored when alpha is 0
this wikipedia articles describes this problem
https://en.wikipedia.org/wiki/Alpha_compositing#Comparison
The most significant advantage of premultiplied alpha is that it allows for correct blending, interpolation, and filtering. Ordinary interpolation without premultiplied alpha leads to RGB information leaking out of fully transparent (A=0) regions, even though this RGB information is ideally invisible. When interpolating or filtering images with abrupt borders between transparent and opaque regions, this can result in borders of colors that were not visible in the original image. Errors also occur in areas of semitransparency because the RGB components are not correctly weighted, giving incorrectly high weighting to the color of the more transparent (lower alpha) pixels.
from opencv.
Related Issues (20)
- Unicode character in comment cause a warning(maybe an error) in MSVC
- Compilation of opencv.js fails with last version of Emscripten toolchain.
- Replacing the Lena image from the documentation HOT 2
- Problem with video time varying depending on brightness HOT 1
- Signed distance field HOT 1
- remap to dst array in python HOT 2
- Compiling with CUDA 11.8 breaks PyTorch convolution HOT 1
- 3rdparty: libjpeg-turbo: IMWRITE_JPEG_LUMA/CHROMA_QUALITY doesn't work with internal libjpeg-turbo
- 3rdparty: libjpeg-turbo: CI has failed if NASM is missing.
- Removing "break" statements from While loop - calib3d, USAC source code
- 使用alpha混合时,生成的照片颜色不正确 HOT 1
- Don't work cv2.imshow on rockchip 3588e HOT 5
- [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:329: lib/libopencv_videoio.so.4.9.0] Error HOT 1
- Does example source have rows and columns switched?
- New findContours finds different results HOT 11
- The difference between opencv2.4.9 and opencv4.8.1 in cv::blur HOT 1
- findContours inner holes has problems with their corners HOT 2
- core: hal: With GCC14, some hal_intrin128.*_CPP_EMULATOR tests are failed. HOT 1
- macOs error: no matching function for call to 'dgeev_' HOT 27
- windows error: invalid cast from type 'pthread_t' {aka 'ptw32_handle_t'} to type 'void* HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.