Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:42:31+00:00 2026-05-27T03:42:31+00:00

there are plenty of tutorials showing how to blend two images in opencv: http://opencv.itseez.com/doc/tutorials/core/adding_images/adding_images.html

  • 0

there are plenty of tutorials showing how to blend two images in opencv:

  • http://opencv.itseez.com/doc/tutorials/core/adding_images/adding_images.html
  • http://aishack.in/tutorials/transparent-image-overlays-in-opencv/

But all of them are based on this equation:

opencv blending http://opencv.itseez.com/_images/math/afeb868ed1632ace1fe886b5bfbb6fd933b742b8.png

which means that I will be combining two images by averaging them and consequently I’ll be loosing intensity on both images.

For instance, let alpha = 0.5, f0(x) = 255, and f1(x) = 0. After applying this equation, the result image g(x) = 127. That is not what I need. The first image should remain unchanged. And the transparency must be applied in the second one.

My problem is:

the first image f0(x) should not be changed and an alpha should be applied to the second image f1(x) when it overlays the first image f0(x).

I cannot figure out how to do this. Any help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:42:31+00:00Added an answer on May 27, 2026 at 3:42 am

    Unfortunately, alpha channels are not supported by OpenCV. From the imread documentation:
    Note that in the current implementation the alpha channel, if any, is stripped from the output image. For example, a 4-channel RGBA image is loaded as RGB if flags > 0.

    See this SO post for a possible work around using imagemagick.

    Hope that is helpful!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are plenty of tutorials how to create multilanguage RESX files and how to
There are plenty of gallery plugins out there that rotate images but they all
there are plenty of tutorials on how to request and parse a list of
There are plenty of tutorials for == and === so please don't guide me
I know there are plenty of tutorials about integrating C++ into Java, but whats
There are plenty of script/tools for counting line of code, and some to count
There's plenty of information on running Java apps as services, but I need to
There are plenty of PHP frameworks out there as many of you know, and
There are plenty of 'pretty-printing' visualization libraries for Javascript. E.g. those listed here. Googling
Dynamic languages are on the rise and there are plenty of them: e.g. Ruby,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.