sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
Quote:
Originally Posted by by me on page 4
I gave up on this thing after nodes came out but I recently once again changed my mind and I started to update chromakey-hsv for 2.43( actually it's almost done...). I fixed a few bugs, updated for 2.43, removed the zoom feature ( you can zoom the preview window now ), and tried to improve it a bit - and then this happened. It seems to work alot better - at least for green keys...

It's still not as good as I would like it to be but it does have more flexiblity than the new plugin:
source: chromakey-hsv-2.43.c
linux: chromakey-hsv-2.43.so
windows: chromakey-hsv-2_43.dll
many thanks to indigomonkey for the new windows build

yeah, Yet Another Sequence Plugin...

I have been trying to improve my zutilz plugin for the last few weeks but I got tired of looking at equations & algorithms that are way beyond my feeble intellect while humming the scarecrow's song
from the Wizard of Oz...(mostly the phrase "If I only had a brain" over and over and over... :-? )

I needed work on something else for a while...

So I thought that I might be able to do a better chromakey plugin. The way I saw it, the problem was that controling the key mask was much better through hsv values not rgb or yuv...

EDIT: old sources and plugins have been removed...

If you compile it for other platforms, please mail it to me and I will post it here

let me know how it works for you- c&c will be appreciated

Last edited by paprmh; 19-Feb-07 at 18:23.
#1   Old 19-Apr-05, 18:21   
Reply With Quote


LOD LOD is offline
 
Join Date: Feb 2004
Location: La Rochelle fr
Posts: 130
ThankYou,
add it with the other in the 'Blender Plugins Ressource Pages'
http://www-users.cs.umn.edu/~mein/bl.../sequence.html

:)
#2   Old 19-Apr-05, 19:55   
Reply With Quote
Caronte's Avatar
Caronte Caronte is offline
Member
 
Join Date: Mar 2002
Location: Valencia-Spain-Europe
Posts: 503
Quote:
Originally Posted by paprmh
yeah, Yet Another Sequence Plugin...
Thanks, you work is very apreciate, but a "real" chromakey must have more options to be usefull with video sources (upper and lower color limit, border smooth, border color supression, and so on...) if you take a look in to Chromanator (Demo), you will see a very good (and cheap) chromakey:
http://fxhome.com/chromanator/

You can see here a nice info on how to make good chroma with DV:
http://www.neopics.com/bluescreen/

Anyway, I apreciate very much your programs
............................................
Caronte.
http://www.nicodigital.com
\"Some day, all will be digital\"
#3   Old 20-Apr-05, 10:00   
Reply With Quote
Gabio's Avatar
Gabio Gabio is offline
Moderator
 
Join Date: Nov 2003
Location: Canada - Québec - Sherbrooke
Posts: 2,195
But is it better? do you have any pic of comparaison for us?
I curious to see the difference of rgb,yuv,hsv
............................................
Venez nous voir au Québec, on est pas sorteux!
#4   Old 20-Apr-05, 17:04   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
[color=darkred][EDIT 9/17/05] changed all img tags to links for the bandwidth challenged [/color]

Caronte: yes, there is alot of stuff that could be added to this- unfortunately they are most probably beyond my abilities-( see 1st post and my new favorite song ) you also have to realize that if( !!!) I ever do figure out the math involved for the filtering technics, nothing I could ever do in a seq plugin will compare with a 5.1meg standalone...

ok, what can it do so far?

I have heard complaints that the chromakey plugins didn't work well and the few times that I have tried them I haven't gotten the best results either...in fact, I have never been able to figure out how to use the yuv version properly(no, haven't tried all that hard either-seemed like more work than it was worth)

here is a (badly compressed) green screen pix I found on the web:
http://webpages.charter.net/paprmh/c...reen-front.jpg
The problem with this image is the range of the green colors that you need to get rid of.
with chromakey rgb the best I could do in about 10 min is:
http://webpages.charter.net/paprmh/c.../rgb-front.png
you can see that even though I haven't been able to get rid of all of the green, parts of the second guy's pants are starting to dissapear
Maybe it's just me...can anyone else do better?

here is after just a couple of minutes with hsv:
http://webpages.charter.net/paprmh/c...ey/b-front.png
all that is left is the darkest shadows near the feet...

first I set the key color at a near middle green value from the image and then play with the h,s,&v tolerance sliders
the v slider seems to make the biggest difference once you get an accurate Hue

This is v.1... I haven't even bothered to add ibuf2 capabilities yet. I just wanted to see if anyone else thought that this would be a better way to control the key mask or if it was even worth working on further for that matter...
#5   Old 20-Apr-05, 22:31   
Reply With Quote
DYeater's Avatar
DYeater DYeater is offline
 
Join Date: Sep 2004
Location: Enon, Ohio USA
Posts: 807
The lighting of that green screen is really bad. Lighting is the most important aspect of green (or blue) screen operations. It looks like your program has done a good job on it. You'll notice a little splash on the edge of the violin, but there is nothing you can do about it. I've downloaded your script and will try it out. Not very used to HSV, but it shouldn't be too hard.

Good work.
............................................
klatu ... birada ... nicto
#6   Old 21-Apr-05, 17:33   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
[color=darkred][EDIT 9/17/05] changed all img tags to links for the bandwidth challenged [/color]
Caronte:Thanks for the links btw... your link for the dv correction looks like something I might be able to do...have you got a short dv clip that you can mail me (or a link to one) to play with? I need a sample of what you are loading into the seq editor so I can test the new code.

DYeater: Yeah, I picked it because it was bad-thought that it would show how much better the huv version worked - the jpg compression is bad too and that is what is causing the splash in several areas-that also made the end of the violin bow and some of the hair of the left 2 guys to dissapear

I never had much use for huv before either but it really is easier to select and control the key mask that way- for me at least

here is a better blue screen:
http://webpages.charter.net/paprmh/c...bluestatue.jpg
and the result:
http://webpages.charter.net/paprmh/c...romastatue.png
#7   Old 21-Apr-05, 23:05   
Reply With Quote
broken's Avatar
broken broken is offline
Member
 
Join Date: Feb 2003
Location: Sydney, AU
Posts: 2,649
That's looking really nice, especially for what seems to be a quick job coding it!

I compiled it for Mac OS X 10.3:
http://mke3.net/blender/etc/chromakey-hsv.1.so

Of course I don't expect it to compete with 'pro' keyers like Primatte, but it would be good if at least sharp edges on the alpha mask could be softened somehow, or if there was some basic spill suppression - i.e. fade the keyed colour from the colour of the pixels around the inside edge of the mask. It's really nice so far though, could be a good candidate for eventual integration in the default Blender.
............................................
web log
#8   Old 22-Apr-05, 03:23   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
thanks for the mac compile broken- I have mirrored it in the first post.

I have been trying to figure out an algorithm that will replace the key color bleeding problem...i.e, take the key color and turn it into an alpha value that will blend with a new background on the edges. ( hmmm... did anyone understand what I meant to say there?)

BTW: I really hope that by "especially for what seems to be a quick job coding it! " doesn't mean "the code is crap but it works" :-?
#9   Old 22-Apr-05, 07:01   
Reply With Quote
broken's Avatar
broken broken is offline
Member
 
Join Date: Feb 2003
Location: Sydney, AU
Posts: 2,649
Quote:
Originally Posted by paprmh
thanks for the mac compile broken- I have mirrored it in the first post.

I have been trying to figure out an algorithm that will replace the key color bleeding problem...i.e, take the key color and turn it into an alpha value that will blend with a new background on the edges. ( hmmm... did anyone understand what I meant to say there?)
Nice one! Remember though, that the colour will still be in the pixels (even if they are less opaque), so it still needs to be taken out of the RGB as well as the alpha.

Quote:
Originally Posted by paprmh
BTW: I really hope that by "especially for what seems to be a quick job coding it! " doesn't mean "the code is crap but it works" :-?
No, on the contrary! From what you wrote it sounded as if it was just a fun little side project, and it's such a small amount of code but it works surprisingly well. I guess I have no idea how long a keyer should be though, just first impressions
............................................
web log
#10   Old 22-Apr-05, 07:05   
Reply With Quote
Caronte's Avatar
Caronte Caronte is offline
Member
 
Join Date: Mar 2002
Location: Valencia-Spain-Europe
Posts: 503
Quote:
Originally Posted by paprmh
Caronte: yes, there is alot of stuff that could be added to this- unfortunately they are most probably beyond my abilities-( see 1st post and my new favorite song ) you also have to realize that if( !!!) I ever do figure out the math involved for the filtering technics, nothing I could ever do in a seq plugin will compare with a 5.1meg standalone...
Ok I said you to take a look into chromanator, because it have a very good tools to fine tunning a chroma effect. I encourage you to donwnload the demo and test it then you can extract nice ideas (the soft edges of the mask is a must, and the still supression too).
The filters don't are very complicated, (mostly are variants of blur) I think very detailed info is in many sites on the web.

Chromanator is a postproduction program, not all the 5.1 mb. are for chromakey indeed.

I haven't access to my DV cam until next week, but if no one post a test video in the mean time I will prepare one short for you in one week

Again, thank you very much for your work, things like these are what sequence editor needs to get more professional

P.D: Sorry for my poor english
............................................
Caronte.
http://www.nicodigital.com
\"Some day, all will be digital\"
#11   Old 22-Apr-05, 09:07   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
Caronte: I should apologize to you for my poor english... and I have no excuse as it is my only language... What I meant was that I am not much of a coder and don't have the math background to understand how alot of these alorithms actually work so I doubt I will be able to get results anywhere as good as a big program dedicated to post production...but I worded it very badly. The chrominator link is definately full of good information though and I have downloaded the demo.

broken: Actually, if you had meant that the code was bad I wouldn't have been surprised... I know that you are involved in BF developement so you would be able to recognize bad code. I am learning as I go here and the odds are quite high that my way of doing things would be considered "crappy" code - even if it does work ok. When I said c & c would be appreciated, I also hoped that a "real" coder might tell me what I could do to improve the code too.

now back to google and trying to figure out how to actually implement some of this stuff...
#12   Old 23-Apr-05, 06:31   
Reply With Quote
birras's Avatar
birras birras is offline
 
Join Date: Jan 2004
Posts: 140
Quote:
Originally Posted by paprmh
Actually, if you had meant that the code was bad I wouldn't have been surprised... I know that you are involved in BF developement so you would be able to recognize bad code. I am learning as I go here and the odds are quite high that my way of doing things would be considered "crappy" code - even if it does work ok. When I said c & c would be appreciated, I also hoped that a "real" coder might tell me what I could do to improve the code too.

now back to google and trying to figure out how to actually implement some of this stuff...
way to go paprmh

[!]

maybe try b.org to get some support
#13   Old 24-Apr-05, 16:34   
Reply With Quote
pamtango's Avatar
pamtango pamtango is offline
Member
 
Join Date: Aug 2002
Location: Oakland, California
Posts: 394
The Mac OS X build for this plugin also worked on my iBook with OS X 10.2.
Might even be used to create sketchy toon edges.
............................................
Madness takes its toll.
Pam ;-)
#14   Old 18-May-05, 17:00   
Reply With Quote
LetterRip LetterRip is offline
Donating Member
 
Join Date: Mar 2004
Posts: 2,015
Here are some papers you might find of interest

Review of matting techniques
http://www.srcf.ucam.org/~cy214/MattingSummary.ps

Matting of Natural Image Sequences using Bayesian Statistics
http://www.ep.liu.se/exjobb/itn/2004/mt/016/exjobb.pdf

Video matting of complex scenes
http://terra.cs.nps.navy.mil/Distanc...ers/chuang.pdf

Shadow Matting and compositing
http://www.csie.ntu.edu.tw/~cyy/cour...ang2003SMC.pdf

A Bayesian Approach to Digital Matting
http://research.microsoft.com/vision...ang-CVPR01.pdf

Segmentation with Invisible Keying Signal
(didn't find an online version)

Depth Keying
http://research.microsoft.com/~eyalo...y/DepthKey.pdf

LetterRip
#15   Old 19-May-05, 09:06   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
Sorry folks, I got sidetracked by another little project ( a cooperative effort!) but now that I have pretty much finished it, I am going to get back to work on hsv again.

LetterRip: Thanks for the links - but those will take me a while to wade through... just skimming a couple of them gave me a headache but I did dl all but the 1st - link broken.

I think that maybe all of the effects necessary for sucessful composting may be done better with a series of plugins - one for each effect needed. ( ie: chromakey, difference matte, dv filter, color bleed, edge smooth, etc.) part of the reason is that there are limits to what you can stuff into each plugin...found that out in my little side project. Some effects could be combined but I think that all in one plugin is out of the question.

speaking of dv filter,
Caronte: have you (or anyone else for that matter) got a short clip that you can either send me or give me a link to? I need something to play with - I don't even know what format you are importing it into blender with... let alone how it looks in the seq editor.

Anyway, here is a quick tip: you can stack several hsv's on top of each other for more control of your key color...

more to come... hopefully soon
............................................
I have found that for the most part, it is better for me to keep my mouth shut and let people think that I am stupid than to open my mouth and prove it... dang... did it again
\\//_
#16   Old 20-May-05, 00:48   
Reply With Quote
LetterRip LetterRip is offline
Donating Member
 
Join Date: Mar 2004
Posts: 2,015
The post script does seem to be missing, here is the google cache of the item,

http://tinyurl.com/chhrv

LetterRip
#17   Old 20-May-05, 03:08   
Reply With Quote
LetterRip LetterRip is offline
Donating Member
 
Join Date: Mar 2004
Posts: 2,015
I'd suggest instead of doing things as a plugin, it be a core tool.

Possibly write up a proposal for the wiki,

LetterRip
#18   Old 20-May-05, 03:10   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
[color=darkred][EDIT 9/17/05] changed all img tags to links for the bandwidth challenged [/color]
Here is a test to see how well I could do with these two pictures using hsv:
http://webpages.charter.net/paprmh/chromakey/moon.jpg
http://webpages.charter.net/paprmh/c...ey/owlblue.jpg
here is a 375 k.png of the owl:
http://webpages.charter.net/paprmh/c...ey/owlblue.png

This is after first pass with red mask for contrast:
http://webpages.charter.net/paprmh/c.../owlC1r.75.jpg

alot of bleed...hmmm... a few more passes with a little alpha on the mask color...
http://webpages.charter.net/paprmh/c...y/owlalpha.jpg

not great, but you get the idea...

http://webpages.charter.net/paprmh/c...wlmoonshot.jpg
............................................
I have found that for the most part, it is better for me to keep my mouth shut and let people think that I am stupid than to open my mouth and prove it... dang... did it again
\\//_
#19   Old 23-May-05, 09:39   
Reply With Quote
paprmh paprmh is offline
Member
 
Join Date: Jul 2002
Posts: 569
[color=darkred][EDIT 9/17/05] changed all img tags to links for the bandwidth challenged [/color]
I also decided to try hsv on a movie clip. I used the demo files for chrominator located here
http://fxhome.com/chromanator/downlo...artFootage.zip
I think that the greenscreen is really poor ( go figure- it's the salespitch for their software...) but I think I did pretty well

This is all done in blender and the seq editor... one of the hardest frames is #12:
http://webpages.charter.net/paprmh/c.../testfra12.jpg
and this is a 1 meg xvid of the 44 frames:
http://webpages.charter.net/paprmh/c...t0001_0044.avi

I would like to see anybody that has other compositing apps download the above clips and see what kind of results they can get with them - I would like to see how badly you guys can beat my results...
[color=darkred] [ :< ]...yeah... I DARE you! [/ :< ] [/color]
............................................
I have found that for the most part, it is better for me to keep my mouth shut and let people think that I am stupid than to open my mouth and prove it... dang... did it again
\\//_
#20   Old 24-May-05, 02:59   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:44.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists