View Full Version : Grayscale Cartoon -> Color script help
color
23rd December 2017, 23:12
Is there a good script to change a grayscale range from #777777 - #808080 to a color like exempel #ff0000 (red)
or #d5d5d5 - #c5c5c5 to #00ff42 (green).
I want to edit in AvsPmod so I can refresh after each level is fixed.
I got a few cartoons that is in grayscale that it could work great with. I did try mark color in a photo editor program and it picked the "right things" that should be in that color.
StainlessS
25th December 2017, 13:52
I could maybe knock something up in a couple of days time, although it would not work as you (I think) desire.
Would take original (source) clip and current modified version of clip (a filter mod for each color change).
Plus input target Grey (same each for R,G,B,) with allowed channel error tolerance.
And would also require output color R,G,B for a target HIT.
You would need to build up a chain of filter instances, where a single mod achieved for each single instance. (would require work by you at each stage).
When finding target pixels, will ignore any pixels where has already been modified previously (compare source with current modded input clip).
I've no idea how successful it will be (possibly resulting in many non intended pixels changed).
EDIT: If does not sound suitable, then say, and save me a little graft ( small G, :) ).
color
25th December 2017, 16:29
I would do that work that needs. :)
I know it takes time and I do understand its not that easy that I make it sounds and that it will not work so easy. But I got a theory and I think you understand it. I was also thinking is it possible to do some kind of greyscale reduction so it gets a bit smoother first?
Like this?
http://www.forumbilder.se/GAH6K/namnlost-1.jpg
StainlessS
25th December 2017, 17:13
For your above sample thing, you would only need give a suitable error tolerance, I guess I could allow separate R,G,B, (defaulting to a grey level, ie give Red value, then both G, and B default to that unless you give more specific G, or B). Same with error tolerance, give tol for R and unless also given for G and B then will use R tol.
Avisynth could I think use a single 3DLut, but it would need to have everything specified beforehand (existing 3Dlut), dont know how you would do that, so, above method is something that will (I think) stand some chance of producing required result, but no guarantees at all.
I shall give it a go, but not today.
EDIT: I think mg262 did some stuff (Fore/Back-Ground CELs) which might be more suitable (if you can get them to work, think was unfinished project), also V.C.Mohan did something about Seam Carving, which also may be related, dont know.
EDIT: Can I ask for clarification, result HITS are intended to be some non grey color, yes ?
EDIT: Both above mentioned projects (mg262 CEL stuff, and V.C.Mohan Seam Carving), are probably more apt and reliable
if they could be gotten to work, these suggestions here are single pixel mods only, no relation to surrounding areas,
and so possible spurious/unintended/crap results. I aint clever enough to even attempt the methods adopted by mg262 or V.C.M,
both way clever lads.
EDIT: I do not intend to spend more than an hour or two on this project, I guess one could create some kind of mask at each
iteration (filter instance) and doing HITS mask simple denoise, get a better results when using only those denoised mask areas,
maybe someone would like to expand on whatever I do, but it will not be me (I have zero interest in 'cartoons', sorry).
EDIT: Last Q. is 32 or 64 bit required ?
EDIT: I think I shall create a Mask (preliminary) rather than simple pixel changes, and so should be a little easier for another (someone else)
to do a better job of it. (do mask denoise, or something, prior to pixel color changes)
EDIT: Sounds more like 4 or 5 hours of playtime, givus a couple of days to get around to it, busy setting up many desktop OS systems
including various distros of Linux, and also some on my super duper new (second hand) Linx 1010B 10 inch Laptop (well 10" Quad core 1.33GHz Touch Tablet running Windows 10, and a simple snap clip-on keyboard), its bloody great ! (I'm used to using XP32, so to you more used to current systems, may not seem terribly good). [Fantastic bargain at £75 for Tablet, and £10 for keyboard, @ CEX].
Windows 10 was not such a ghastly experience as I thought it would be, not good, but way way way, better than expected :)
I might even give a review at CEX for this buy, me loves it :) [EDIT: 2GB mem, 32GB storage, [B]do not get 16GB storage version].
Is 32 bit system, but can with a bit of effort take 64 bit, Windows 10 or linux [will be using nearly Flush fit, 64GB/128GB external USB key for this, so windows 10 x64 and linux x64 duel boot sys (using YUMI, maybe more than duel boot, perhaps Andoid x86 too)], eg KALI linux.
Currently got 64GB HiSpeed Sandisk SDCard in situ, is supposedly tested up to 200GB, but max limit not known (presumed 256 at least).
[although with only 2GB RAM, need good reason to go 64bit, eg testing 64 bit code].
EDIT: Linx 1010B £75.00:- https://uk.webuy.com/product.php?sku=STABLIN1010B12NKB#.WkEzfmRQNWc
KeyBoard £10.00 [1010 or 1010B, nearly same] :- https://uk.webuy.com/product.php?sku=SACCLIN1010KB#.WkEz8mRQNWc
EDIT: DO NOT GET Linx 10, you want 1010 or 1010B, 1010/B, versions have 2 full sized USB ports and micro USB for power (10 has no full size USB and dedicated power supply, but also micro USB). EDIT: Also, Linx 10 (older version) takes different connector keyboard.
Comes with 1 year subscription MS Office Web version.
EDIT: Not sure, think 1010B is 64 bit compatible, 1010 may not be (UEFI stuff, both have same 64 bit capable ATOM processor).
EDIT: NOTE, 1010/B have 2 full sized USB ports, if it dont, then its the older Linx 10, CEX tend to confuse the two with some 10's
being sold as 1010/B, and some 1010/B's being sold as 10's. [took my initial 10 back (to high street store) and without any hassle exchange for 1010B].
StainlessS
26th December 2017, 11:40
Color, I saw you perusing mg262 thread, presume looking for CEL stuff.
Dont know if any use at all, but I've posted both here
celforeground_25_dll_20050909.zip:- http://www.mediafire.com/file/baxpkekvcdq1o6z/celforeground_25_dll_20050909.zip
https://forum.doom9.org/showthread.php?t=99778&highlight=celforeground
celbackground_20050923.zip:- http://www.mediafire.com/file/uqbp9cd2a4p0hlm/celbackground_20050923.zip
No thread of that name by mg262.
There is probably little/no docs, mg262 tended to only document via a thread (ie everyone had to dredge the entire thread
to glean any information at all).
color
26th December 2017, 12:04
Yes, the greyscale should be end up with color like one greyscale should be red etc. I had to look up "mg262" plugin, I did find ColorIt (http://avisynth.nl/users/vcmohan/ColorIt/ColorBrush.html)also, but does it work to use it with more than one color?
https://www.pixeltopic.com/files/2017/12/lnjyqykdilyhgyz.jpg
As you said, To do a mask might be better, maybe ColorIt could work with that or mg262, but does it work with mutiple colors? I don't realy If I know how to do a basic script with multiple colors I might be able to spend time at my own trying to do it myself. But I only understand how to do it with one color.
I do have a few denoisefilter so I might fix this but its the "masking" i don't really understand how to get it to work.
I'm using 32-bit windows. I'm accouly more into linux-based operating system. We accouly have one Linx "tablet" that my partner is using. And it is great. Maybe its time for a new one. I will have a look. I'm using a laptop and its not that powerfull but It works. :) And it is great to have a full size USB-port, I have broken a few things because the "micro-usb" or "mini-usb" its horrible.
raffriff42
26th December 2017, 15:22
>does it work with multiple colors?
All these techniques work on on color at a time. Multiple colors require multiple passes.
If every desired output color maps to a unique input gray scale value, you can use ColorKeyMask (http://avisynth.nl/index.php/Layer#ColorKeyMask).
OTOH, if every desired output color does not map to a unique input gray scale value (for example, attempting to color the sky in the above image will also partially color the birds and the flowers) you must select the area of interest in some way, such as using a paint program eyedropper (EDIT I mean flood fill) tool, or VC Mohan's ColorBrush (http://avisynth.nl/users/vcmohan/ColorIt/ColorBrush.html). (EDIT or a polygonal garbage matte (https://forum.doom9.org/showthread.php?p=1797959#post1797959))
Repeat for every color -- and repeat for every frame of course.
color
26th December 2017, 21:05
Ah, so it might be a bit more to do. But is it possible to do this an easier way?
raffriff42
26th December 2017, 23:27
>is it possible to do this an easier way?
Yes, sort of. Artificial intelligence will solve the problem eventually.
https://en.wikipedia.org/wiki/Film_colorization#Digital_colorization
Keep an eye on that link; things are progressing rapidly in this field.
Right now (this has happened in the last couple months) you can colorize single images on-line for free:
http://demos.algorithmia.com/colorize-photos/
You can do a whole movie that way; I have no idea what the cost would be. A lot, probably.
color
28th December 2017, 18:52
>is it possible to do this an easier way?
Yes, sort of. Artificial intelligence will solve the problem eventually.
https://en.wikipedia.org/wiki/Film_colorization#Digital_colorization
Keep an eye on that link; things are progressing rapidly in this field.
Right now (this has happened in the last couple months) you can colorize single images on-line for free:
http://demos.algorithmia.com/colorize-photos/
You can do a whole movie that way; I have no idea what the cost would be. A lot, probably.
Sadly its expensive, I did try LetTherBeColor! (https://github.com/satoshiiizuka/siggraph2016_colorization) that is completely free. I did have problem with the time, it tooked about 1-3 minutes per images to process (i did shrink them thinking of merging only color on the original black/white). It did work with moving images that was filmed but not cartoons. I do wish someone could make a program that uses this, its open and free so one day I hope.
Right now, I'm glad only with colorizing greyscale cartoons with 3-4 colors. I could manage living with 3-color gren, red...and what more color was used in cartoons in the 20-30's (Cinecolor if i remember right?)
Yanak
31st December 2017, 02:09
Maybe using Hald Cluts and FFmpeg ?
Creating the CLUT file with color replacements in Gimp with the Gmic plugin and the "Customize Clut" filter, and at the end exporting the CLUT and then applying it with FFMPEG on the video.
Picked one picture from google after "Grayscale Cartoon" search :
https://s13.postimg.org/5lpfskad3/443693_Original.png
In Gmic plugin i done changes on 4 colors, replaced them by another and locked the black color ( max is 24 colors possible to be replaced or locked with this Gmic filter) :
https://s13.postimg.org/7dienhokz/74526720171231014129.png (https://s13.postimg.org/l76rcjh6f/74526720171231014129.png) Click to view full size
At the end i got my Hald Clut file:
https://s13.postimg.org/oe1aw69c7/806058_Hald_Clut.png
Then you should be able to apply the Clut file created using FFMPEG, i don't recall the command line for FFMPEG, will need to check the documentation, but for FFPLAY ( simple player that comes wiht ffmpeg ) it's :
ffplay.exe input.mkv -vf "movie=clut.png, [in] haldclut"
For this quick test i used this cmd :
ffplay Original.png -vf "movie=Hald_Clut.png, [in] haldclut"
Result is this, the grayscale 1st picture with the clut file above applied on it :
https://s13.postimg.org/oe1aw5m6v/23422820171231013308.png
Didn't picked the best picture for the example as you will really need clear images with clear grayscales areas or you get this borders lines effect...
Applying 4096x4096px Clut on videos probably works better than colorizing grayscale stuff, i don't know.
Well it ain't the most elegant solution but as you already worked a bit with a image editor... nor the easiest i guess but it works somehow... as long as you have very clear grayscales ( de-satured colors) areas.
Sadly avisynth does not support Hald Cluts, nor 3D Lut's like .cube files, i was told VapourSynth can use LUT's, never used it and i will probably have to try one of those days, but if it works it might be possible
Or still with Gimp and Gmic it should be possible to edit fully one grayscale frame picture from your video, then using the gmic "Transfer Colors" filter to generate a high-res 4090x4096px CLUT based on the 2 layers differences and then somehow transform the Hald Clut in a LUT file usable to be applied to all the video materials, or still use ffmpeg to apply the clut png file.
( There is also a command line tool to apply Cluts on images, using a small .bat batch file it might be quite fast, but all pics, clut and all the frames of the video, need to be in .tga format, using the "HaldCLUT_correct" command of the tool can be found here at the bottom of the page : http://www.quelsolaar.com/technology/clut.html )
This last one I already it for pictures only, but once you have the Clut file it should be the same for video stuff, ( also maybe possible to generate a clut from the single layer of the edited with colors frame ) , and i'm confident there is some ways to convert a clut into a 3D lut then.
Again it's probably not what you expected but maybe something to explore, biggest issue is to have the input with clear and distinct grayscale colors, the gmic filter i used have some options to play a bit with and how it impacts the colors to detect / treat but i never really used those much honestly.
color
2nd January 2018, 09:53
Yanak, wow, that accouly look amazing. I did lay a blur filter over the color and made it an overlay only with colors on the grey-scale original.
http://www.forumbilder.se/H5K31/namnlost-1.jpg
I think this can be a way to try it. I will have a look later today. This is a good start on the new year. :D
HAPPY NEW YEAR!!! :D
StainlessS
2nd January 2018, 10:01
Glad you got sorted, I decided that later suggestions were better options that my suggestion, totally forgot about ColorKeyMask,
and Yanaks solutions looks good too.
And a Happy New Year to you too :) :) :) :) :) :) :)
Yanak
2nd January 2018, 14:13
Happy new year guys ;)
Making an overlay + a bit of post polishing could work yes, doubling the color values you desire to once the overlay applied with let's say 50% opacity still get a color close to the color you initially wanted could do the trick too ( or duplicate the created picture + multiply mode on the 2 layers and merge them might work too ) ,
but you need to have a clear input footage to start i think, with clearly delimited areas of grayscale, not sure how it is possible with avisynth but reducing the grayscale shades of the input will help a lot, maybe it is possible and not too complicated to reduce the number of colors output from the original grayscale video first ?
- Reducing the grayscale colors output from the original video to have more clear areas to paint
- Extract a frame and replace colors using gmic like above to output a Hald Clut.
- Overlay original + color corrected video, maybe overlay the original + the one having more clear grayscale areas + the color corrected one applied on the more clearer one
- Finish with a bit of post processing to polish this could bring some interesting results.
- The painting can be done in one single frame and get the Hald Clut but if i recall correctly you can also do it in a few frames and get the cluts from them, then it is possible to "Merge" 2 or more Hald Clut files together to have a single color palette, can't remember exactly the process but I'm confident i read something about this some times ago.
Another thing that could be handy for those who are familiar with ImageMagik ( I'm not sadly :p ) is that you can interpolate the values of a had clut based on a few changes and generate a new color palette :
http://im.snibgo.com/sphaldcl.htm
I never used ImageMagik but if i understood correctly this could be interesting to bring a more extended Hald Clut with extrapolated color values based on the few color changes made, this will cover a larger spectre of colors.
If you are good with this stuff it's maybe something to look at, I'll have to dive deeply into ImageMagick one of those days but for now it's above my Knowledge.
Good luck ;)
PS:
I think to apply HaldClut on video and export in FFV1 and MKV with ffmpeg :
ffmpeg -i "input_video.mp4" -i HaldClut.png -filter_complex "[0][1] haldclut" -c:v ffv1 Result.mkv
Also in case it could serve someone else one of those days, with FFMPEG to generate a 512x512px identity/ default colors HaldClut ( max res seems to be 512px in ffmpeg) :
ffmpeg -f lavfi -i haldclutsrc=8 -frames:v 1 HaldClut.png
or :
ffmpeg -f lavfi -i haldclutsrc=8:rate=1:duration=1 HaldClut.png
This can be handy if let's say you have a colored picture extracted from your video, in a pictures editor you apply a few filters or curves or whatever that is reproducible in the haldclut picture you then just need to repeat the same process in this created clut picture, save it and you can then apply it and all corrections done to your entire video using ffmpeg + the HaldClut, same on another program supporting it :) ( I wish avisynth could support this kind of stuff too )
color
2nd January 2018, 18:13
I was almost about to give up cause I didn't get the command to work, then I realised I somehow moved the ffmpeg 0.4.5 to the directory not the new one 3.4.1.
I will try some more now I got it to work. :D Thanks for the script that helped me alot, I did miss a bit first also. :) Can that script be written in winFF also so I can use multible video-files if it works with the greyscales?
Did try to use ImageMagick but never got it to work, I tried to get multible photos be colorized in a movie (LetThereBeColor!) but I had to do one image per image. I was thinking on trying to get it to work but I never got it to work fast as many others.
OFF TOPIC. Yes I have to do a bit after colorizing the movie. I did some try with a ordinairy movie (in black and white) (only a few levels of grey) and if using a few colors (blue, red, orange, green) it was given a great "color feeling" to it
color
2nd January 2018, 18:55
I did try to merge the color but its like some frames are out of sync, also after a few seconds of rendering/exporting the movie it just stop working. I'm using this script below, otherwise the coloring works great with this script given above:
In CMD:
ffmpeg -i "input_video.mp4" -i HaldClut.png -filter_complex "[0][1] haldclut" -c:v ffv1 Result.mkv
AVISYNTHSCRIPT (but it looks likes it out of sync and crashes)
B=DirectShowSource("C:\Users\carll\Pictures\E01.mkv")
C=DirectShowSource("C:\Users\carll\Pictures\test.mkv")
Overlay(B, C.BicubicResize(B.Width, B.Height), mode="chroma")
Yanak
2nd January 2018, 19:30
For WinFF i don't know, never used this :/
Exporting in FFV1 is maybe not the greatest way as it renders in very high bitrates, ends up in very large files, was testing this on a very short sample so i did not mind much, removing the ffv1 part to export in default x264 settings is probably better for what you are trying to do ( might be in 4:4:4 by default ) :
ffmpeg -i "input_video.mp4" -i HaldClut.png -filter_complex "[0][1] haldclut" Result.mkv
Need to check ffmpeg documentation for more encoder output settings, i usually don't use it much for x264 encoding.
I'm a bit in a hurry for now but will give a try later to your avisynth script, try without the ffv1 codec and it should be better i think.
color
2nd January 2018, 19:35
I will give it a try without the ffv1 and see how it goes. :) I will make some testing. :) I was afraid that some scenes would have colors completely off but It don't and looks great. But I have a few that is kind of flickering so I think I need to do a deflickering first on them. I'm so happy, this is exactly what I wanted. :D
Yanak
2nd January 2018, 19:57
It's just a color replacement matrice, if you do a nice color replacement HaldClut but in the original video the colors goes off on some scenes the same will be applied on the colored one.
Might be nescessary to prepare the input video before painting a frame from it and later apply the HaldClut on modified video ( after that the original can be merged with overlays etc ) , reducing grain and noise with some avisynth filters maybe, maybe increase contrasts and some other settings like this to get more distinct shades.
Also not sure if possible but reducing the number of colors displayed, like it can be done in an image editor by reducing the palette to 8 or 16 colors only so it is easier to make the changes, can even be only 2, 4 or 6 or whatever colors, this is possible in images editors, not sure how to proceed with avisynth to achieve this and if possible at all.
Like this pic
https://s13.postimg.org/4jf9a21uf/43516603_The_Booze_Hangs_Highnew304.jpg
using only a 16 colors palette :
https://s13.postimg.org/ug8xmlkwn/46316803_The_Booze_Hangs_Highnew304.png
But should have been de-grained, smoothed and cleared in avisynth before applying the palette to get a better result with more constant colors and shapes i think. Well maybe something like this with maybe more colors for the palette, depends of the input material quality and contrasts i guess, this one in this state will end up in a mess.
Lot of things to test but the more clear and distinct colors the areas on the input video and the frame you will work on for the color transfer will be the better it might end up, well i think, never really tried to "repaint" a grayscale movie, usually i use haldcluts to rework curves and work a few other effects only, kind of custom 3d Luts easy and quick to do in an image editor.
Good luck and let us know how it ends up for you :)
color
3rd January 2018, 10:31
I was looking on the mozaik-style plugin for avisynth, It might be modified, or maybe enlarge the image so the "pixels" don't make wierd shape when adding it over the movie.
http://www.gyroshot.com/turnstile.htm
BTW, CMD does not exist on all windows 10 (it dissapeared but appeared after another update), it works perfect with PowerShell (shift and right click, choose "Open PowerShell Windows" but there is one change, its the beginning, " .\ " needs to be added:
.\ffmpeg -i "input_video.mp4" -i HaldClut.png -filter_complex "[0][1] haldclut" Result.mkv
Yanak
3rd January 2018, 20:08
I did not even knew win10 had this removed , still on win7 :p
the plugin to use a palette is interesting, not tested but i'll give it a try when possible, the same stuff can be done in a image editor like gimp with a selection of color palettes or you can also create you own ones, using the 1st picture i posted earlier and some palettes:
https://s13.postimg.org/lwpjovf53/78445620180103195153.gif
Might be possible to use 4-8 colors palettes only, a few different passes with different 4-8 different colors palettes and merge/overlay the results obtained with the avisynth plugin, results might be funky ...
In avisynth after using a few "cleanup" filters on my input cartoon to polish it a bit i end up with this :
https://s13.postimg.org/6b884wvh3/119989_New_File130400000.png
Original pic had 513 different colors in it, this one have 399 colors in it, i'm not sure how it is possible with avisynth but i need to keep a smooth look like this ( as much as possible ) while reducing the number of colors by a lot more to then start painting it and make a Hald Clut out of it.
color
10th January 2018, 18:30
I have tried to fins a good way to do this but i dont find it. But yes a smoothening works good also. :) I have been doing a lot in the house so thats why im a bit late for answering. :) But ill check in here when i have time. :) Love this forum.
Yanak
12th January 2018, 16:20
I managed to downsize the colors to 8 colors only, or 16 or a bit more using the plugin you linked earlier in this thread.
TurnsTile(clip, 1, 1, res=3)
this brings 8 colors only in the frame, res=4 brings 16 colors, this was after converting video to grayscale ( yeah even if it was already grayscale footage lol )
Yet it needs a few steps to achieve something half decent and the video materials i have for tests always end up with some colors displaying in the wrong areas, downsizing the original video frame to a smaller size before cleaning and smoothing it and applying the colors filters might help to get more distinct areas for a restricted number of colors, then colors applied and upscaled to overlay on original video.
Still my same frame, cleaned and smoothed but with 8 colors only :
https://s13.postimg.org/ni4tghug7/cart00ooncolor000304_8colors.png
16 colors :
https://s13.postimg.org/jlrhkiow7/cart00ooncolor000304_16colors.png
Same pic but it was downsized to 320x230px before smoothing and then the TurnsTile filter, 8 colors :
https://s13.postimg.org/z78t4tgdj/cart00ooncolor000304_small8colors.png
16 colors :
https://s13.postimg.org/6hlx86k3b/cart00ooncolor000304_small16colors.png
Didn't had time to try with even smaller sizes.
The good thing is that once you have the full process done you can directly send the .avs script to ffmpeg to encode it while applying the hald_clut, probably also possible to make a more complex command for ffmpeg and get the overlay merge of the videos also done in it.
Didn't have enough time to continue play with this last days but will probably come back to it when i'll have a few hours free to burn ;)
Edit : maybe upscaling the video then TurnsTile(clip, 4, 4, res=3) or even higher values for the pixels size could bring something too, need testing ...
color
1st March 2018, 18:20
Hello. Sorry for late reply, I have been sick and in the hospital. Had not strength do to anything but I'm better now. :)
I have reinstalled my pc, but I will try a bit more, and thanks for all help! :)
color
3rd March 2018, 17:51
I was wondering, how do I do an "identity CLUT"? I was thinking of trying to colorize a few frames then make an identity clut. Off course I will have to do some modification cause of the greyscale in same shade wont be getting problem with different colors.
Yanak
3rd March 2018, 20:03
Hello,
hope things get better for you and are not too serious problems.
You can generate one identity clut using the tool you can find here http://www.quelsolaar.com/technology/clut.html or simply download one like here : https://rawpedia.rawtherapee.com/File:Hald_CLUT_Identity.tif
This said G'mic have recently added a new plugin that might be better for the job now :
https://pixls-discuss.s3.amazonaws.com/original/2X/a/a38cbd105c63681b39e3c15700d1c4b8f816a0ed.png
"New filter Colors / Equalize HSI-HSL-HSV allows to apply offsets to hue,saturation and intensity/lightness/value for different image tones. "
The results in the example is quite nice, i spent some time with this when released but could not get similar results, still it wasn't bad at all compared to previous method. It is limited to 10 settings/colors, but you get a lot of shades possible with this.
I started to mess with it when released and then forgot about it, I made the changes on one frame from a grayscale video, then used the command line tool of gmic to apply it on all frames i had extracted from the video.
See a bit more here about how to do it :
https://discuss.pixls.us/t/release-of-gmic-2-2-0/5983/9
https://discuss.pixls.us/t/release-of-gmic-2-2-0/5983/14
The command line tool is supposed to support videos as direct input, in theory you do your colorizing in gimp, note the settings and use them in the command line tool with the video as direct input, sadly the video support doesn't work on windows apparently, but if you have linux it should work directly.
Still you can import video into avisynth and polish it ( removing dirt and grain seems to give better results for what i could test ), then either use avisynth to export all frames into a folder, then apply the gmic new filter with the parameters you got on gimp using a small batch file to proceed all frame files quickly.
Then reimport the frames in a sequence acting like a movie in aviynth for more post-polishing.
I sadly deleted the things i worked on, only thing i got remaining is this frame :
https://s14.postimg.org/p7jk9p39d/output4_000000.png
Had polished it in avisynth, then passed into gimp & the new gmic filter and applied a few color tones only, had pushed this a lot more with more colors but this is the only thing left on my pc ... but as you can see the tones/colorized parts are not bad ( i think :p ).
Like i said i stopped to mess with this as having other things to spend my free time on, but might restart to look into it and polish the process at least, but i really think it's something you should look at, the results i got were really not bad after figuring out this new plugin settings ( which took me a bit of trial and errors :p )
Few steps that might help:
- import video in avisynth and apply some polishing filters to remove grain and artifacts essentially.
- from avisynth export the image sequence into a folder
- pick one good frame, copy it somewhere and import it into gimp and start to colorize with the new gmic filter.
- export the colorized frame once as a new layer with "output message : verbose > to log" mode enabled in gmic output settings, this is to get the filter parameters that you will use in the command line version of gmic.
- with the command line tool apply the filter on all frames you extracted from the video.
- with avisynth import all frames as a video sequence and post polish.
many of those steps can be automated , just missing time to dig into this myself for now, of course if you have a linux working you can skip all export/import frames and use the video as input directly with gmic command line tool.
This is something i will get back at, just not know when i'll have time for this yet :)
color
4th March 2018, 18:57
Oh wow, I just updated Gmic' but I have not seen this yet. I got help with installing "ubuntu shell" on windows 10, it works great but there is some difference in some installing packages like python and to get the "th" to work. I am accouly trying out "Let There Be Color! (http://hi.cs.waseda.ac.jp/~iizuka/projects/colorization/en/)". It is mutch faster in the "ubuntu shell" than in "pure install of ubuntu" wierdly. So I might give it a try with the ubuntu terminal. Can't CNR fix some artifacts like in the color?
I'm just happy that you helping me. :)
How to install ubuntu terminal to run script on windows:
If someone want to know how, first go to Control Panel > Programs > Turn Windows Features On Or Off. Then enable “Windows Subsystem for Linux (https://www.howtogeek.com/wp-content/uploads/2018/03/ximg_5a985001e7f37.png.pagespeed.gp+jp+jw+pj+ws+js+rj+rp+rw+ri+cp+md.ic.A9a1NZlKJD.png)” option in the list. You need to restart your computer. After this you need to install ubuntu shell (https://tutorials.ubuntu.com/es6-bundled/src/codelabs/tutorial-ubuntu-on-windows/img/899b872e62ee0dab.png), this can be done by opening "Windows Store" and search for Ubuntu, then install. Don't forget to update by
$ sudo apt-get update
sometimes apt-get don't work, that means that there is some missing packages. It can easily be fixed by searching for them on a linux/ubuntu-forum. But thats it. Oh by the way, to get into the c: folder you have to write:
$ cd /mnt/c/
color
4th March 2018, 18:59
Oh yes, I did try the tool to do a identity clut but I did not get it to work. I think I'm writing the wrong script in cmd, even tried it in PowerShell. Maybe I should try to download the already done one. :)
Yanak
4th March 2018, 19:38
Hi,
I don't have win10, still on win7 so beside creating a double boot or use a liveCD i can't do this, but i'll keep this bookmarked for the day I'll upgrade my setup will come, ( if i get enough cash for this :p ), thanks.
Using the tool to create a clut you need to call the "HaldCLUT_create_win32.exe" add a name for the file.tga output and the level ( 4 is for a 64x64px, 8 for a 512x512px, 16 for a 4096x4096px haldclut. )
In the end :
HaldCLUT_create_win32.exe tiny_64px_Clut.tga 4
HaldCLUT_create_win32.exe medium_512px_Clut.tga 8
HaldCLUT_create_win32.exe High_Res_4096px_Clut.tga 16
Possible also to generate some using FFmpeg, but only 512px max if i recall correctly, but png possible so files are lighter compared to .tga only in the tool :
#for the setting haldclutsrc the ranges are 2 to 8
2 generates a tiny 8x8px clut
4 makes a 64x64px
6 makes a 216x216px
8 makes a 512x512px
cmd :
ffmpeg -f lavfi -i haldclutsrc=8 -frames:v 1 HaldClut.png
or
ffmpeg -f lavfi -i haldclutsrc=8:rate=1:duration=1 HaldClut.png
Hope this helps a bit.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.