Log in

View Full Version : vcm a new plugin with many functions


Pages : [1] 2

vcmohan
13th October 2020, 07:24
vcm (http://www.avisynth.nl/users/vcmohan/vcm/vcm.html) is a plugin that has all functions of vcmod, vcmove, vcfreq and vcMisc. A few more functions are also included. During upgradation of functions, some input parameters might have been changed. My plugins index page also reflect this change. In future I intend to update this plugin as and when necessary and keep the older plugins unaffected. The links to them however will not be in my index page.
Those functions that work in frequency domain need libfftw3f-3 dll in the path. It is dynamically linked so other functions that work in spatial domain need not have this dll.
I have a few days back added a new function ColorBox that gives an output similar to that of colorbars of avisynth. The output will be any YUV color (excepting half float) format.
I remember to have posted a thread about this plugin, but I fail to see it in search. So posted this again.

StainlessS
13th October 2020, 10:57
vcmohan,
Perhaps this post a few days back (not thread):- https://forum.doom9.org/showthread.php?p=1925351#post1925351

I have added a new function ColorBox to this vcm plugin.
It outputs boxes of colors in all YUV formats (except YUV444PH). The frames are output for 100 sec at fps 24. May be useful as colorbars of avisynth.

Perhaps you could not find due to searching for a thread.

Anyways, this is google search I used (D9 search would probably also work searching "vcm ", user "vcmohan", Posts.

Note below, "vcm " ===== "vcm" + SPACE.
GOOGLE:- "vcm " NEAR "vcmohan" site:forum.doom9.org
https://www.google.co.uk/search?ei=Z3eFX_L6Ksel1fAP14Sz0AI&q=%22vcm+%22+NEAR+%22vcmohan%22+site%3Aforum.doom9.org&oq=%22vcm+%22+NEAR+%22vcmohan%22+site%3Aforum.doom9.org&gs_lcp=CgZwc3ktYWIQA1CyVljZwQFg5MQBaABwAHgAgAGUAYgBiw2SAQM3LjmYAQCgAQGqAQdnd3Mtd2l6wAEB&sclient=psy-ab&ved=0ahUKEwiyyujJpLHsAhXHUhUIHVfCDCoQ4dUDCAw&uact=5

EDIT: D9 search on Thread Title ONLY containing "vcm" and posted by user "vcmohan",
finds only this thread and the link at top of this post.

To view all threads started by vcmohan, go to his Profile Page, click on Statistics.
Click "Find all threads started by vcmohan".

EDIT: I cant really post a link to "Find all threads started by vcmohan" as searches expire after a time
(maybe about 30 minutes or 1 hour), and so link will no longer work.

ChaosKing
13th October 2020, 11:10
You can also show all post by a user. Click on your nick and then on "Find More Posts by vcmohan"

sl1pkn07
17th October 2020, 23:01
fail build on linux

https://gist.github.com/sl1pkn07/859235f9726ccb6100ecfe1bbf391a42

greetings

vcmohan
24th December 2020, 07:20
I have added two new functions f2qBokeh that operates in frequency domain and bokeh that is in spatial domain. I understand that "bokeh" means to blur in Japanese. Many smart phones have this setting with camera.
A big difference between pics taken of birds, flowers or animals with high end cameras by seasoned photographers and taken by rest of us lies how the background appears vis-a-vis the object. Great pics have the background blurred beyond recognition in shapes similar to shape of Iris of camera, whereas ordinary pics show background with enough detail , though slightly blurred, to detract attention.
With a view to blur background more keeping in focus pic undisturbed these two functions are designed to operate. The metric used to discriminate in focus and out of focus parts are different in these two functions. Size of grid used and threshold play a key part in getting an acceptable result and so some experimentation using frameEval is required.
I have not yet posted the source code as I invite comments for improvement. As it is in my mind there are a couple of issues to be addressed. A link to a display of processed image (http://www.avisynth.nl/users/vcmohan/manyPlus/f2qbokeh0.png)
. Top left is input, right is heavily blurred image, bottom left is F2QBokeh output, Right has difference between input and output. This was obtained using avisynth+ platform but similar results can be expected on vapoursynth.

Selur
23rd February 2021, 16:12
Any change to get a version of vcm that is not compiled with dependencies to MSVC C++ 2013?
(first I used an old vcmod.dll from 2016, but even http://www.avisynth.nl/users/vcmohan/vcm/vcm.7z from this year requires that old MSVC,...)
Ideally a static build or a runtime that comes with Windows 10 by default?

Cu Selur

vcmohan
3rd March 2021, 13:41
Any change to get a version of vcm that is not compiled with dependencies to MSVC C++ 2013?
(first I used an old vcmod.dll from 2016, but even http://www.avisynth.nl/users/vcmohan/vcm/vcm.7z from this year requires that old MSVC,...)
Ideally a static build or a runtime that comes with Windows 10 by default?

Cu Selur

Sorry for it. I am using 2019 VC++. But it appears it goes to previous version as I recompile. May be I need to have afresh create a new project somewhere else and compile?

pinterf
3rd March 2021, 14:06
Platform Toolset set to "Visual Studio 2019 (v142)" should be enough, in Project Configuration|General

vcmohan
4th March 2021, 07:33
Thanks. I have changed that already and uploaded new version .

Selur
6th March 2021, 07:33
looks fine thanks ! :)

vcmohan
22nd April 2021, 12:48
Added a function StepFilter. This removes HorizontalBars seen in some VHS tape conversions. While frequency domain versions f1quiver and f2quiver may yield better results for removal of such noise, this function is simpler to use. Some blurring may occur.

vcmohan
29th May 2021, 08:35
All frequency domain functions were revised and new functions F1QClean and F2QLimit were added. The first charecter of names of all functions are changed to upper case, so as to conform to the Vapoursynth convention.
Bug reports and suggestions are very much welcome.

zorr
29th May 2021, 21:08
Thanks, I find especially the frequency domain functions very interesting as I recently discovered they can be used for creating masks. You also have many other interesting plugins like Neural. I'd love to see more examples on how they can be used.

vcmohan
30th May 2021, 13:32
Thanks for the kind words. I would love to put examples for each function but that takes lot of space. I have limited space on my page.
About Neural, I am also disappointed at not being able to use. Possibly video processing is not linear maths only. In fact I have two more neural functions, but did not include them as I could not find any place they can be used.

zorr
30th May 2021, 22:04
I would love to put examples for each function but that takes lot of space. I have limited space on my page.

I see. What kind of arrangement do you have? Could you get more space? Disk space is cheap these days so it shouldn't be a problem to have a little more for these valuable contributions.

If that's not possible you could always host your images on free image hosts. I personally use https://postimages.org/. Of course they are not as reliable in principle but at least my images have stayed there for years.

vcmohan
31st May 2021, 08:09
My web page is graciously being hosted by avisynth for over a decade I was allotted 100mb. I did not ask for more. May be I will some time soon. Thanks for the link. The site probably shows some ads. It may be against the policy of this forum. I need to check.

ChaosKing
31st May 2021, 09:32
You could also use github as a "hoster". Github pages (limit is 1GB) are static sites too. Everything is free.
You only need very basic knowlage of git + there are many guis for that. In addition you can also host your source code there, make relases and people can contribute more easily to your filter.

If you don't want to use github and still need more space I would happily give you some GB on vsdb.top with a subdomain of your choice.

vcmohan
31st May 2021, 12:40
Thanks for the suggestion. I will explore Github. I thought it hosts only code and not html and images.

ChaosKing
31st May 2021, 13:11
https://avs-plus.net is for example a Github Page (with a custom domain). The domain stuff is optional.

vcmohan
31st May 2021, 14:35
Thanks. But it looks I will not be able to keep images on the GITHUB. Images require more memory than the code. I find I am at 82mb used out of 100mb space. Only thing I can think of now is to delete all images from avisynth 5 and 6+ versions and use the released space for avisynth+ and vapoursynth versions. In the tutorial on the GITHUB, it was stated that only text is allowed. Clearly images are out.

ChaosKing
31st May 2021, 14:38
Images are allowed! I can send you an example / small tut later.

ChaosKing
31st May 2021, 15:01
Look here is your html code + a image on github: https://thechaoscoder.github.io/pagestest/
Image url https://thechaoscoder.github.io/pagestest/unnamed.png

I added a branch "homepage". You just choose this branch in your github repo settings and github will use it as the root folder to serve html pages. Repo: https://github.com/theChaosCoder/pagestest/tree/homepage

I will upload a short video later on how to do it.

EDIT
You could also stay on avisynth.nl but host only the images on github. Basically what zorr suggested with an external img hoster.

zorr
31st May 2021, 23:13
Thanks for the link. The site probably shows some ads. It may be against the policy of this forum. I need to check.

You can link to the images without any ads. For example if you look at the first post in this thread (https://forum.doom9.org/showthread.php?t=176076) the images are all hosted on postimages.org.

And like Chaos said Github is also an option. But you just need to figure out what works best for you.

ChaosKing
4th June 2021, 10:35
Took a bit longer but here's a quick how to setup github pages.


https://www.dropbox.com/s/q6ue2r2p8bhpkge/gitpage.mp4?dl=0

or direct download link https://www.dropbox.com/s/q6ue2r2p8bhpkge/gitpage.mp4?dl=1

* The "myhomepage" branch is optional, you could also just use "main".
* I just found out you can even drag and drop a folder with all your images in the upload box thingy!
* There a some good and free git GUIs like "GitHub Desktop" where you can clone, pull and push with just a mouse click.


Editing in ScreenToGif is not the best experience :D

ReinerSchweinlin
6th July 2021, 21:41
Some PNGs could be reduced in size with some PNG Optimizer - but 100MB eventually will be not enough :)

If you want something traditional, I could give you some space to host stuff - not using it myself, so what better use than to support such fine filters :) I would gladly help you out!

vcmohan
13th July 2021, 14:22
Many thanks. I am examining my page and finding some unnecessary images. I will remove them and optimize rest. many thanks once again.

Selur
17th July 2021, 10:28
@vcmohan: Any hint in how to convert a defish(fov=114,scaling="fitxy") (https://forum.videohelp.com/threads/402482-Which-parameters-to-use-with-FFMPEG-to-rectify-Mars-helicopter-images) in an equivalent vcm.DeBarrel(..) call?

vcmohan
17th July 2021, 13:57
I have not really thought about that. But may be try with a square sized frame and debarrel with relatively higher values for a and b. I am not sure it will work. I will try.

Selur
17th July 2021, 16:10
I will try.
Thanks, I keep my fingers crossed, since I would really prefer to use Vapoursynth with vcm.DeBarrel instead of Avisynth with defish to drop the Avisynth dependency (which would allow me to do this on Linux and MacOS), but I now have spend quite some time and I don't seem to be anywhere near the results I (so easily) got with defish.

Cu Selur

vcmohan
18th July 2021, 12:37
The problem with the input is the center of frame is not the center of the fish eye. Need to correct for that first. As the fish eye looks like a circular photo, the value of c be 0.5 with a and b at zero. Sorry I misguided you. I also added borders on left, top, bottom and right for centering and for accommodating the corrected image. Finally I cropped to be equal to that of the defish_eye image seen in the link.
the script used is
<code>
ret = core.std.AddBorders(ret,left = 100, right = 100, top = 100, bottom = 740)
ret = core.vcm.DeBarrel(ret,abc =[ 0.0, 0.0, 0.5],pin = 0)
ret=core.std.Crop(ret,left = 60, right = 60, top = 40, bottom = 740)
</code>

Selur
18th July 2021, 13:41
Nice! Thanks!
Avisynth with defish(fov=114,scaling="fitxy"):
https://i.ibb.co/FkQVCHV/defish-fox-114-scaling-fitxy.png
DeBarrel:
https://i.ibb.co/DkLbvLC/debarrel.png

Cu Selur

ChaosKing
18th July 2021, 14:07
defish looks extremly cropped, is this normal?

kedautinh12
18th July 2021, 14:13
Can you share me original picture to compare??

Selur
18th July 2021, 14:22
Can you share me original pickture to compare??
Original pic was linked in the thread I linked to, you can download it from https://mars.nasa.gov/mars2020/multimedia/raw-images/RRF_0104_0676180997_659ECM_N0040510RHAZ02002_01_295J
defish looks extremly cropped, is this normal?
Not sure whether it's normal, but since it by default keeps the input resolution it's to be expected to crop quite a bit.

Selur
18th July 2021, 16:38
btw. when using:
defish(fov=114,scaling="fitxy", scale=0.5)
you see why the cropping is so strong:
https://i.ibb.co/ryGz7JG/defish-fox-114-scaling-fitxy-scale-0-5.png

Cu Selur

kedautinh12
22nd July 2021, 11:51
Success to port script to avisynth x64, thank vcmohan very much

zorr
28th July 2021, 20:11
I'm testing vcm.F1QLimit and noticed some oddities.


The max value of span is 99, with bigger values I get error message "F1QLimit: limit percentage value can be 0 to 99". I tested with 1920x1080 source so the max should be 1920/8 = 240.
Documentation states that frequencies should be at least 10 larger than span but on some cases it needs to be 11 larger. For example span=90 and freqs=[100] gives error message "F1QClean: freqs must be between 10 + span and nuquist - span". Changing span to 89 or frequency to 101 makes the error go away.
The max frequency should be 512 - span but if span is even then the correct formula is 512 - span - 1. For example with span 6 the max frequency is 505. Does even span make sense, should it always be odd?

vcmohan
2nd August 2021, 13:27
As my laptop was and still down since last week, I did not see this comment. It looks like the problem is in floating point and integer conversion. I will rectify It as soon as I get either a new battery pack for my laptop or buy a new one(Expensive)

sl1pkn07
29th August 2021, 00:19
Hi seems the latyest source code fail build for me


In file included from vcm.cpp:79:
F2Quiver.cpp:203:10: fatal error: hammingCodeInsert.cpp: No such file or directory
203 | #include "hammingCodeInsert.cpp"
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


greetings

vcmohan
29th August 2021, 13:24
[QUOTE=zorr;1948668]I'm testing vcm.F1QLimit and noticed some oddities.[?QUOTE}

At last I could get most of data into my new laptop. The documentation for these two filters (F1QClean and F1QLimit) are revised. Please check now. Thanks for pointing out the errors. regards.

@sl1pkn07: The missing file is inserted now.

zorr
30th August 2021, 21:02
The documentation for these two filters (F1QClean and F1QLimit) are revised. Please check now. Thanks for pointing out the errors. regards.

Thanks, I'll test them.

sl1pkn07
3rd September 2021, 09:16
hi

now fails with:


vcm.cpp:91:10: fatal error: Mean.cpp: No such file or directory
91 | #include "Mean.cpp"
| ^~~~~~~~~~
compilation terminated.


greetings

vcmohan
4th September 2021, 14:06
hi

now fails with:


vcm.cpp:91:10: fatal error: Mean.cpp: No such file or directory
91 | #include "Mean.cpp"
| ^~~~~~~~~~
compilation terminated.


greetings
Sorry. I included it now. Hope no more misses. I am somewhat overwhelmed with this. I have to seriously learn to use GitHub.

sl1pkn07
5th September 2021, 18:29
sorry vcmohan, but still fails

https://sl1pkn07.wtf/paste/view/raw/e14324ca

greetings

Myrsloik
5th September 2021, 19:22
sorry vcmohan, but still fails

https://sl1pkn07.wtf/paste/view/raw/e14324ca

greetings

Why are you trying to compile windows only code on not windows?

sl1pkn07
5th September 2021, 21:56
then unixDynamicLinkingCodeForFFT.cpp is for?

vcmohan
7th September 2021, 13:45
then unixDynamicLinkingCodeForFFT.cpp is for?
Sorry. It is not required. Long time back tried to convert to Unix. That is a remnant. Please ignore or delete.

vcmohan
11th September 2021, 08:42
I have added two functions to this plugin. 1. CorrectLD and 2. Circles.
CorrectLD is short for correct Lens Distortion. This includes barrel, pincushion , different formula to the DeBarrel, and also fish eye. Fish eye correction can be done with 4 methods viz: Orthoganal, Linear, equisolid and panaromic. Normal images can also be convereted to fish eye images by this function. In test mode dots on original image show the area covered and curvatures. This function takes in 3 parameters diameter, fk and rix. Test mode may be useful to decide upon parameters to use.
Circles just draws circles on image and may be useful to specify center of a circular curvature seen in fish eye images which have been edited.
For the image from mars used in a post above the following code may be tried.
##ret=core.imwri.Read ( r'C:\images\fisheye.jpg')
##ret = core.std.AddBorders(ret,270,270,670,0)
##ret = core.vcm.Circles(ret, dim = 0.5,dots = 1,xo = 870, yo = 1270, fdia = 2800, cint =50)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 3,q = 4, fk = 2.804825, rix = 1.25,xo = 870, yo = 1270, fdia = 2800)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 4,q = 4, fk = 2.804825, rix = 1.25,xo = 870, yo = 1270, fdia = 2500)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 5,q = 4, fk = 2.804825, rix = 1.25,xo = 870, yo = 1270, fdia = 2500)
##ret = core.vcm.CorrectLD(ret, test = 0,dim = 0.5,dots = 2, method = 6,q = 4, fk = 3.04825, rix = 1.25,xo = 870, yo = 1270, fdia = 2500)
Request feed back on features or bugs.
@selur may look into. I have some reservation in why should a horizontal horizon be strived at? It should remain circular I think.

Selur
17th September 2021, 13:54
Thanks new function seems to work fine.
I think the horizontal horizont is simply something one would expect when looking at a horizont.

vcmohan
17th September 2021, 14:07
If one sees all around the horizontal horizon should be all around so must be circular. From a paper from Pune University I read a scheme to make the circle fit into a rectangle. Possibly it has made the change in deFish fitxy. I will try a different procedure and check. Will take some time.