Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2005, 01:58   #21  |  Link
insanedesio
Registered User
 
Join Date: May 2003
Posts: 27
The one called FinalReport.pdf or whatever seemed a bit useful, I managed to sift through it up to the ModifyPixel function, and then got confused. I'll have to take a closer look when I get a chance.
insanedesio is offline   Reply With Quote
Old 20th April 2005, 12:43   #22  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
GOOD NEWS:
Ming Yang, author of "Still Image Colorization" has replied to my mail
He plans to release the source!
I still have to talk to him a bit about GPL and stuff, but things look very good
I'm in a hurry right now, just wanted to tell the good news
E-Male is offline   Reply With Quote
Old 20th April 2005, 21:01   #23  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
This could be way off, but just thought I'd throw in what I quickly gathered from the two papers.

The finalreport.pdf method has quite a few steps but is pretty easy to follow as far as I understand from the webpage and code. Basically, you start with the original image with a given set of pixels (say, set A) that have had their colors manually defined. Inside this set you define groups (say i, ii, iii, ...), each group contains all of the pixels of matching color that are connected (i.e. one group for each manual color marking). Next, for every pixel in the image that is not in set A, you find the top three colors or groups for it. The ranking is done by smallest luma difference. To find the luma difference to each group from a single pixel, you find the smallest luma difference of any pixel in the group to that pixel. Once you have these rankings defined there is a propagation step that swaps the ranked colors between each pixel not in set A and its surrounding 8 neighbors. This swapping is based on local luma differences between each pixel and its 8 neighbors. The swapping routine continues until it converges (i.e. no more changes occur). After all of the above, you end up with 3 color values for each pixel. The last step is you average these 3 colors together based on the weighting function they give which is a function of luma difference. This could possibly be improved by taking distance into account as well.

The other method seems as though it could implemented as an iterative minimization process using the local average function they define in the paper. This would slowly propagate the colors throughout the image without colors propagating across major boundaries. The process would be similar to iterative smoothing processes like anisotropic diffusion. Also, while it does use motion vector information, it is only to define neighbors in the surrounding frames and not to propagate colors in time. So one could ignore that part initially and make a single frame version. My main concern would be it could take quite a while (many iterations) for such a method to converge or fully propagate colors on large images. The paper says it takes something like 15 seconds per image and the images they used are relatively small.
tritical is offline   Reply With Quote
Old 20th April 2005, 21:39   #24  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
Quote:
Originally posted by tritical

The finalreport.pdf method has quite a few steps but is pretty easy to follow as far as I understand...
we'll have the complete source of that soon
plus people already looking into it

so we might really have a colorisation plug-in in the near future

i already got some idea of combining this with mvtools and maybe my pixeledit plug-in to get a video-version (without 'scribbeling' each frame)

exiting to have another expensive thing going open-source
E-Male is offline   Reply With Quote
Old 20th April 2005, 21:54   #25  |  Link
guada 2
Registered User
 
Join Date: Feb 2005
Location: Lyon
Posts: 718
" so we might really have a colorisation plug-in in the near future.
i already got some idea of combining this with mvtools and maybe my pixeledit plug-in to get a video-version (without 'scribbeling' each frame)
exiting to have another expensive thing going open-source "


Very interesting in the content and of the form.
I hope that that will be enough for you to lead to "artistic work" conclusive.

Good luck E-Male
guada 2 is offline   Reply With Quote
Old 21st April 2005, 02:46   #26  |  Link
insanedesio
Registered User
 
Join Date: May 2003
Posts: 27
I'm working on a smoother based loosely on the stuff in the original paper. I'm doing it not so much to make a good smoother, because I don't know how well that algorithm will work out for smoothing purposes. I'm doing it more as a first step in this process. Once I get that done, and after my final on Saturday, I'll start looking at putting actual colourization code into it, although the way I'm trying to implement it, I might not have to do much... but the paper itself isn't that informative, so it's hard to tell what exactly will happen. Plus, I don't really know what I'm doing .

After that, I'll hopefully take a look at MVTools to add in temporal neighbour detection.

EDIT:
Oh, yeah, and thanks to tritical who's helped me a lot in getting the smoother started.

Last edited by insanedesio; 21st April 2005 at 02:50.
insanedesio is offline   Reply With Quote
Old 21st April 2005, 03:41   #27  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
here is the full source (needs OpenCV):
http://e-rels.dyndns.org/downloads/ColorSource.rar
it's GPL, the author asks for his homepage url to be kept in (also in all code based on this), which seems fair to me

i couldn't get it too compile,yet
if someone knows how fix that, please post
i get these errors:

MainFrm.cpp
u:\colorize\MainFrm.cpp(39) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CMainFrame::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
ColorView.cpp
u:\colorize\ColorView.cpp(40) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CColorView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
u:\colorize\ColorView.cpp(41) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CColorView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
u:\colorize\ColorView.cpp(42) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CColorView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
u:\colorize\ColorView.cpp(43) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CColorView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
u:\colorize\ColorView.cpp(44) : error C2440: 'static_cast' : cannot convert from 'void (__thiscall CColorView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
None of the functions with this name in scope match the target type
E-Male is offline   Reply With Quote
Old 21st April 2005, 04:37   #28  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
while i can't compile the stand-alone tool i had a look at the code and at the opencv library
and it seems like putting the colorozation algorithm inside an avisynth plug-in won't be hard
there also is room for improvement:
it needs Y,Cb,Cr which is similar to YUV and can be fed from avisynth directly (no need to go over rgb conversation, also i'll do that in my first test)
the way opencv stores images in memory is about the same as avisynth uses, so many thing will work without copying, just pass pointers (for the non-programmers: there shouldn't be a big slowdown caused by avisynth<->openal conversions)
E-Male is offline   Reply With Quote
Old 25th April 2005, 05:27   #29  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
i got a bit further and it seems that a full avisynth port (opencv-free) will be possible

i'm not sure yet what's the best (most pracial & userfriendly) way to feed the needed material (gray clip, colors and mask)
but i think i'll soon have a test version ready
E-Male is offline   Reply With Quote
Old 25th April 2005, 14:00   #30  |  Link
HighInBC
Registered User
 
HighInBC's Avatar
 
Join Date: Jan 2003
Location: Victoria, BC, Canada
Posts: 144
Single frame clips would be good, or perhaps a built in image loader.

If it is going to have a temporal aspect aswell, then you will need to add color touchups every so often, a good interface with this would be to just name the file like so:

color00.bmp
color07.bmp
color18.bmp
color97.bmp
...

then the plugin will know the framenumbers from the filename. I hope this makes sense, it is only 6am for me.
HighInBC is offline   Reply With Quote
Old 25th April 2005, 16:46   #31  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
nice idea, i'll keep that in mind when advancing to the video version
E-Male is offline   Reply With Quote
Old 29th April 2005, 00:12   #32  |  Link
insanedesio
Registered User
 
Join Date: May 2003
Posts: 27
Finally got the smoother finished. There are a couple things left that I want to add to this before I do the actual colourizer. A lot of the code for the colourizer will be copied verbatim from the smoother.

Here's the smoother:
ColourizeSmooth v0.7.4.0

EDIT: v0.7.4.0 up with YV12 support. Same link above. Probably the last change for a couple of days, and then I'll start looking at temporal neighbour detection.

Last edited by insanedesio; 30th April 2005 at 01:32.
insanedesio is offline   Reply With Quote
Old 29th April 2005, 03:01   #33  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
had a quick look, but can't test in the next view days

since we're both working on colorizing plug-ins it might be best that we join our efforts
E-Male is offline   Reply With Quote
Old 29th April 2005, 05:56   #34  |  Link
insanedesio
Registered User
 
Join Date: May 2003
Posts: 27
Yeah, that might work, but you're working yours based off the code from that other guy... I'm trying to get something off of the original algorithm. Besides, I'm still working on the smoother, couple things I want to add (temporal neighbour detection being the most important). I also want to add YV12 support but it seems like a pain in the ass to upsample it to YUV or downsample YUV to YV12, so I might drop that because I'm just that lazy.
insanedesio is offline   Reply With Quote
Old 29th April 2005, 10:39   #35  |  Link
guada 2
Registered User
 
Join Date: Feb 2005
Location: Lyon
Posts: 718
insanedesio,

It is a beautiful initiative, good continuation
guada 2 is offline   Reply With Quote
Old 10th May 2005, 18:37   #36  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
got Ming Yangs code ported, working on the interfaces now
E-Male is offline   Reply With Quote
Old 11th May 2005, 15:45   #37  |  Link
HighInBC
Registered User
 
HighInBC's Avatar
 
Join Date: Jan 2003
Location: Victoria, BC, Canada
Posts: 144
You rock, thanks!
HighInBC is offline   Reply With Quote
Old 25th December 2006, 06:38   #38  |  Link
jimlong
Registered User
 
Join Date: Dec 2006
Posts: 4
Any progress with the ColourizeSmooth project?

Hi E-Mail,

Ay progress with this project? I saw this post late and it seems it's been one year since last post. However, I'm still very interested about this great idea. I tried to download ColourizeSmooth v0.7.4.0 and colorsource.rar from your site but failed. Is http://e-rels.dyndns.org still on?

Thanks,

Jim
jimlong is offline   Reply With Quote
Old 25th December 2006, 17:32   #39  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 150
Hmmm this is very cool indeed.

I have always been very concerned about my lame blue skies in my footage. Maybe this would get my deep blue look im searching for

Last edited by anton_foy; 25th December 2006 at 17:38.
anton_foy is offline   Reply With Quote
Old 27th December 2006, 17:50   #40  |  Link
Hero--
Registered User
 
Join Date: Nov 2002
Posts: 8
another thread

I found this thread:
http://forum.doom9.org/showthread.php?t=93990
Hero-- is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 +1. The time now is 14:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.