Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to extend an Image from side to side softening the hard edge of image
#1
I use Gimp and Blender to make my Videos, I have an Animation of the Sun Series: 
see https://www.youtube.com/playlist?list=PL...fvNkVm3m6c

As you can see from the Image below Original 

[Image: Sun-2013-01168-720.png]

The Corona or Radiating Fire of the Sun has a hard edge on both sides sometime, sometimes they extend up and down, but not much, and the few times this did happen I fixed them by hand, but the side ones do not look good. 

This is a NASA public domain images of the Sun in AIA 193 4096x4096 format, with an Environment image texture of the Stars as background using Blender. 

What I want to do is soften the hard line so it looks more like this:

[Image: Sun-2013-01168-720-Soft.png]

I just did a fast Smudge by hand in GIMP, this was originally a Blender question.

There are over 33,333 images for one Year and I have over 6 years of images that I am working with, that is over 200,000 images, so I can not do this by hand in my lifetime since I am dying of Cancer my time is limited, I am old and have Arthritis as well, so it would be a very painful way to go out, and I might not finish it, so why start, but I wanted to finish this series, and go back and do years before the series started, which is 2010, so people can view the sun over a decade, but the hard edge looks bad, and I know there is a way to fix this, but I am not good enough at blender or Gimp to figure it out, I think I ask once a year, and try to figure out how to fix it, my guess is that I need to write a script that takes the edges of the images and blurs or smudges it side ways in an oval shape, but I know even less about it when it comes to automating edits in gimp, then I do about Blender, not even sure it can be done, no idea how to do that, anyone have any ideas?

I originally did the video in 1080, now I want to render it in 2160, since the originals are larger then the 3840, it should look good at 4k, but I want to fix this issue since it will take a long time to render all these images in Blender.

Thanks
Reply
#2
Making a selection and using the resynthesizer plugin, I get something like this:

   

I think what really counts here is the width of the sampling of the surroundings.

One problem is that the generated structure is fairly random, so on one hand it will not look too pasted in but
on the it may change too fast.
Reply
#3
I do not think it is feasible. especially for "quote" over 200,000 images

The original image looks to be square so will need the canvas width increasing.

I tried seam-carving (liquid-rescale plugin) and ran through some gmic filters without much success.

The best is this but it involves several stages, a path just skirting the sun hides any hard edge - path to selection with a big feather (50) - motion blur with direction maxed out. Then needs repeating for the other side.

example:
[Image: PS4reNs.jpg]

All that into some sort of script without really knowing the exact proportions of individual 'sun' images. Best of luck.

also: the link to the demo video is broken.
Reply
#4
Thanks for the Help, I updated the Link, I copied this post from another site and it put ... in it, I did not notice:
https://www.youtube.com/playlist?list=PL...fvNkVm3m6c

Now I just need to write a Bash Script and see if I can do this from the Command Line Interface (CLI), has anyone done this before? I will search to figure out, thanks.
Reply
#5
If you want to do this, your best bet is GMiC. It is an image processing system that can be used either as a Gimp plugin (nice to check things interactively) and as a command-line driven processor. It includes a series of "inpaint" filters (the more suitable is repair/inpaint [patch-based], with some explanations here. Once you have found something that works for you in Gimp, you can transform this into a shell command that you can apply to your images.
Reply
#6
Thanks for the help, but I just could not wrap my head around this, I did read all the articles and links it had to others, but still could not figure out how to automate this process.
Reply
#7
@Flesh
Sorry can not help with coding, I am just a dumb civ eng(ret) who once knew a bit of FORTRAN Wink

Another day, another look and I went back to the G'mic plugin. One of the filters might do it. In the repair section, solidify. Not a wonderful result, gives this.

[Image: ILgKhLz.jpg]

Found some 512x512 images, a couple of minutes to set things up, then for those 28 images 29 seconds for 28 layers. How many possible at one time depends on your computer resources.

A video of the process https://youtu.be/A4fzyeJLB6w 5 minutes

Several scripts/plugins mentioned. If the procedure is any use, let me know and I will dig out where to get them.

This done in Kubuntu 16.04 so should be no problem there.
Reply
#8
(07-22-2017, 10:03 AM)rich2005 Wrote: @Flesh
Sorry can not help with coding, I am just a dumb civ eng(ret) who once knew a bit of FORTRAN Wink

Another day, another look and I went back to the G'mic plugin. One of the filters might do it. In the repair section, solidify. Not a wonderful result, gives this.

[Image: ILgKhLz.jpg]

Found some 512x512 images, a couple of minutes to set things up, then for those 28 images 29 seconds for 28 layers. How many possible at one time depends on your computer resources.

A video of the process https://youtu.be/A4fzyeJLB6w 5 minutes

Several scripts/plugins mentioned. If the procedure is any use, let me know and I will dig out where to get them.

This done in Kubuntu 16.04 so should be no problem there.

Thanks, that was a great tutorial, I will see what happens when I load up a 33,333 images, maybe do it a 1000 at a time, at any rate I do believe the computer would crash if I tried to load too many at a time, I only have 32 GB of RAM. 

For some reason I was thinking this would be done from the command line one image at a time, I had no idea you do this in Layers, that is why I could not wrap my mind around how you did this above, but I learned something new and I appreciate the time you took to do this.

I think if I grab just the other corona as shown in one of the threads, it will look better, since I do not want to effect the Original Corona, but if I alpha over the original it may not matter, I was hoping to find a way to just paint to the Transparent new Canvas, without touching the original, as all I really want to do is fill past the hard edge to extend it, but what I can do is just alpha over the original, and that is done the easy way, so why make it harder then it needs to be. 

I remember FORTRAN, back in the 70's, we had to program on cards and work with a deck reader, in the 80's I got to work converting them to C++, because someone did not like FORTRAN, no idea why, its still in use today.

I have been working in Blender to see if there is a way to do this, no easy way with this many images, it took a week on one i7 computer server to render just the background and sun with no other processing, so far this technique is the only other way I can see to do it, but I have to try it and see what the results will look like.

Doing this by hand it looked more like Fire then a Corona, the corona changes slowly over time, its not Fire, its Electromagnetic Energy or Electrical in Nature, the Sun is not an Atomic Bomb nor does it Burn Hydrogen, that Science is for Fools who believe in the Dynamic Universe, I wrote a Book titled "The Principles of the Trinary Universe" about how the Sun actually works, if anyone is interested in knowing, the link is here:
http://trinaryuniversity.org/papers/


What I really need is an App that can center the Sun better, I would have to remove the date time line and alpha it over, currently I do this by hand, about 10% of all the images are jumping around as the Satellite makes corrections at 6 AM everyday, if NASA just zoomed out just a little I would not have to do this with the Corona, but I have to work with what I have, and this is the only source I can find for images of the Sun like this.

I got these here: https://sdo.gsfc.nasa.gov/data/aiahmi/ for those that are interested, and to make this thread more complete, if anyone knows of a better Public Domain repository I would be interested in the link. 

Thanks for all the Help.
Reply
#9
Not a tutorial, just my thoughts.

I don't know if you want these but scripts/plugins used

gmic_gimp_qt from http://www.gmic.eu

anitools.py is on the old gimp plugin-registry site but is a pain to find. This will add alpha to all layers as shown and also write layers to individual png's if required.

color-to-alpha-for-all-layers is a rough script I found. Make sure bottom layer is active before using. see the attached zip for those two

Adding a background layer was using Ofnuts plugin interleave-layers-0.4.py from http://sourceforge.net/projects/gimp-too...s/scripts/ worth a look there, all good stuff.

As I see it, the hurdle for any batch operation is the pesky need for a selection to constrain any effect. The gmic filter works on transparency so if you can create those transparent areas some other way, then the selection would not be necessary and gmic standalone (different from the gimp plug-in) will run from a bash file.
The maintainer of gmic is on vacation at the moment but a good way of asking the question is at http://gimpchat.com in the plug-ins/gmic section. I am sure somone there has better ideas, best of luck


Attached Files
.zip   ani-c2a-all.py.zip (Size: 1.69 KB / Downloads: 197)
Reply
#10
(07-23-2017, 07:34 AM)rich2005 Wrote: Not a tutorial, just my thoughts.
...

Thanks, I am reading about it now, I decided to go ahead and make the transparency, I used IM CLI:

mogrify -background transparent -gravity center -extent 4696x4096 -format png -path ../2016-png *.jpg

this gives me 300 px on each side, converts it from jpg to png so I can add transparent, from there I can apply the effect you mentioned above, wow is that slow, it will be done tomorrow sometime, 33,333 files is a lot of files, and that is just one year.

My thought is that even if I can find a way to do this in Blender, I need the Transparent side bars to work with, there are other tools out there like IM, that allows you to batch process images, but I cannot find any that automate a Smudge, and that is what works the best, so that is what I will search for tomorrow, as well as what you sent, I know I can fix this, its just how, and I want it to look real, I was toying with the idea of a Vignette, it would look better then a box, but it would not look real, yep, NASA screwed me on this one, I wonder whose idea it was to think that it did not matter if they filmed the whole Corona, I bet I am not first one that got annoyed about this.

I think I made the point that the Corona does not always create a Hard Line, so I do not want to add this effect unless it does, and I noticed that G`Mic has tools to do "if" checks, so it should be possible to use Gimp Script Fu, so I am reading about that as well.

Thanks for the help.
Reply


Forum Jump: