tag:blogger.com,1999:blog-7023576929606369407.post6783851047708248816..comments2023-10-31T10:47:50.956+01:00Comments on Jepson's Blog: Overlay transparent image in OpenCVMichael Jepsonhttp://www.blogger.com/profile/16073118583952778532noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-7023576929606369407.post-78826173890168404862023-03-24T04:30:17.591+01:002023-03-24T04:30:17.591+01:00Thank you bro, you're life saverThank you bro, you're life saverAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-84947330308163281252023-02-07T13:03:36.120+01:002023-02-07T13:03:36.120+01:00You for sure saved me some time! thank you!You for sure saved me some time! thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-17339422713802070682022-08-10T19:14:18.253+02:002022-08-10T19:14:18.253+02:00Amazing, thank you. I had to apply an overlay to a...Amazing, thank you. I had to apply an overlay to a radar video stream, and this work perfectly on the first try.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-56920916298291678222018-06-29T18:18:51.176+02:002018-06-29T18:18:51.176+02:00can i get the java code of this please ?can i get the java code of this please ?Anonymoushttps://www.blogger.com/profile/10406123565578752035noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-47700244589917902602018-03-21T07:43:02.303+01:002018-03-21T07:43:02.303+01:00It is very Useful post to me and i am also web dev...It is very Useful post to me and i am also web developer.clipping path associatehttps://goo.gl/p4Dzaenoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-3633646233744205932018-02-22T18:23:26.350+01:002018-02-22T18:23:26.350+01:00Michael Jepson basically i have applied this alrea...Michael Jepson basically i have applied this already but i am getting wrong result <br />i only want to overlay logo over shirt image such that it looks realtics please see my required images resultUdaib khanhttps://www.blogger.com/profile/14895818444128712590noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-67778837575280333892018-02-22T14:53:41.051+01:002018-02-22T14:53:41.051+01:00Hi Udaib,
Just lower the opacity value. So if yo ...Hi Udaib,<br /><br />Just lower the opacity value. So if yo have a foreground image that consists of a non-transparent logo, on a transparent background, you could just alter the opacity.<br /><br />You can see that before the overlay I calculate the opacity by getting the 4th channel value of a pixel of the foreground, which I divide by 255.0 to get a value between 0 and 1.<br />You could just Michael Jepsonhttps://www.blogger.com/profile/16073118583952778532noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-50385018955711878542018-02-22T14:11:23.167+01:002018-02-22T14:11:23.167+01:00Hey Micheal Jepson i am also facing such kind of p...Hey Micheal Jepson i am also facing such kind of problem i.e image overlay using transparency can you please help me ..<br />i just want to place one image on another using image overlay transparency.<br />here is my problem <br />https://www.mathworks.com/matlabcentral/answers/383715-place-one-image-on-another-image-using-image-overlay<br />Udaib khanhttps://www.blogger.com/profile/14895818444128712590noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-65759840206856881792018-01-10T19:50:02.566+01:002018-01-10T19:50:02.566+01:00Hi Thanks for your tutorial. For my usecase, I'...Hi Thanks for your tutorial. For my usecase, I'd like overlay an png image as only background as transparent, but main object(here in your example sunglasses as opaque). If I just do the simple copyTo, then the overlay image copied with black background. Is there any way that I can do this? Basically I just want to add the overlay png image as photoshop layer. SmileJiminhttps://www.blogger.com/profile/14054947738699713683noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-3110086039307731252017-12-19T12:49:50.416+01:002017-12-19T12:49:50.416+01:00thank you for your code! It helps a lot!thank you for your code! It helps a lot!Anonymoushttps://www.blogger.com/profile/01087941480300612873noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-16936287645234748532017-09-10T18:56:15.611+02:002017-09-10T18:56:15.611+02:00Thank you. It's work.Thank you. It's work. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-83402942366170583822017-06-23T16:31:19.786+02:002017-06-23T16:31:19.786+02:00This comment has been removed by the author.Himhttps://www.blogger.com/profile/14638217743156518351noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-59072818104590767972017-06-23T11:38:00.220+02:002017-06-23T11:38:00.220+02:00Hi Anonymous,
You could just run every scanline i...Hi Anonymous,<br /><br />You could just run every scanline in a separate thread for instance. So that if you have 8 cores, you can do 8 scanlines at once. Or you could see if you could divide the whole images in 8 equal parts, so for 800 scanlines, you'd get 8 parts of 100 scanlines each and then run those in parallel.<br /><br />Regards,<br /><br />MichaelMichael Jepsonhttps://www.blogger.com/profile/16073118583952778532noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-35693896671036915532017-06-23T11:21:55.458+02:002017-06-23T11:21:55.458+02:00Hi Michael, i got a problem. Your code runs too s...Hi Michael, i got a problem. Your code runs too slow for my needs.<br />I need to process two images per frame in a 30 fps video<br />overlayImage is at worst 10ms processing time in my cpu<br />I need to paralelize your method. <br />Is there a way to paralelize it?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-20625891183213496732017-05-09T06:57:28.596+02:002017-05-09T06:57:28.596+02:00Really you saved a lot of time of mine, Thanks onc...Really you saved a lot of time of mine, Thanks once again.. i think it's a cool tricksSonyahttp://4best-info.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-72600943425330480392017-04-24T11:33:46.593+02:002017-04-24T11:33:46.593+02:00hey tq michael .I understood but then am a newbie...hey tq michael .I understood but then am a newbie to opencv and iOS so could you please help me more?<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-86254023209281143372017-04-24T08:40:37.393+02:002017-04-24T08:40:37.393+02:00Hi Anonymous,
You will just have to use this code...Hi Anonymous,<br /><br />You will just have to use this code for every frame in the real-time video. So basically, grab a frame, call the function to do the overlay and then show, send or encode the frame (or whatever you need to do with the frame afterwards).<br /><br />Regards,<br /><br />MichaelMichael Jepsonhttps://www.blogger.com/profile/16073118583952778532noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-91926223276000636452017-04-24T05:51:38.623+02:002017-04-24T05:51:38.623+02:00hey can u please give the code for overlaying imag...hey can u please give the code for overlaying images in real time videoAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-85439022221358728542017-03-07T21:10:36.326+01:002017-03-07T21:10:36.326+01:00Thank you for your code, i am currently using this...Thank you for your code, i am currently using this code for a proyect in which i had to develop an overlay for drone cameras but i couldnĀ“t make it work with opencv addWeighted method because i wanted an opaque overlay.Himhttps://www.blogger.com/profile/14638217743156518351noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-29777264173056156302017-02-13T20:34:23.765+01:002017-02-13T20:34:23.765+01:00can anyone help me to get the java code of the sam...can anyone help me to get the java code of the same work?Anonymoushttps://www.blogger.com/profile/14945317701292806529noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-52473921046261801742016-11-25T12:21:16.799+01:002016-11-25T12:21:16.799+01:00code working perfect for me in ios but result imag...code working perfect for me in ios but result image color changed Dharini Prajapatihttps://www.blogger.com/profile/11831309009458393388noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-69036527392700762442016-11-25T12:18:25.773+01:002016-11-25T12:18:25.773+01:00This comment has been removed by the author.Dharini Prajapatihttps://www.blogger.com/profile/11831309009458393388noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-16957286746086451612016-03-13T11:22:31.328+01:002016-03-13T11:22:31.328+01:00hi haw i can make this code work using java...hi haw i can make this code work using javaAnonymoushttps://www.blogger.com/profile/17495851687127834655noreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-18903902416000408022015-12-14T12:02:16.311+01:002015-12-14T12:02:16.311+01:00
Thank you soo much for sharing brother !
It was r...<br />Thank you soo much for sharing brother !<br />It was really helpful !<br /><br />programmersnhttps://github.com/programmersnnoreply@blogger.comtag:blogger.com,1999:blog-7023576929606369407.post-66441145958308384672015-07-14T19:50:22.220+02:002015-07-14T19:50:22.220+02:00I know this thread is a bit old but I thought I...I know this thread is a bit old but I thought I'd post a copy of the function that modifies an existing Mat instead of creating a new output Mat in case anyone finds it useful: https://gist.github.com/maximus5684/082f8939edb6aed7ba0aMax5684https://www.blogger.com/profile/14931649668663238267noreply@blogger.com