Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Redrobes free Image Processing Tools.

  1. #11
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Default

    Recipe: Instant Islands

    I was going to talk about spatial filters but then I recalled that I ought to mention this next one first.

    Instant islands is a real quick and dirty way of getting a world map. All you have to provide is an world / island number which is your choice from 1 to 999999. You also provide the width and height of the result and then run it. It should provide an instant basic world map. It will generate a rough colour image and also the height map for it in HF2 format.

    So if I set it to generate a 2000 x 2000 image and select map 12345 then I get this:

    InstantIslands_12345_2000x2000.png

    Thats it.

    The land masses do not have any plate tectonics or erosion or are not specifically very realistic. Its just a starting point for you to make something out of.

    Best to run it with a low res sizes like 800x800 or 800x400 or similar and when your happy up it to the required resolution and re run it. You get the same map but with more resolution.

    Oh and pick a very unguessable island number if you want to base your own personal world on its results, as everyone gets the same map with the same number !
    Last edited by Redrobes; 03-15-2021 at 09:24 PM.

  2. #12
    Guild Journeyer TimetoDraw's Avatar
    Join Date
    Feb 2020
    Location
    N.Ireland
    Posts
    242

    Default

    Great job on this!

  3. #13
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Default

    Quote Originally Posted by TimetoDraw View Post
    Great job on this!
    Thankyou !

    Today I want to talk about spatial filters. I have been going on about them since I joined the guild and they are very cool but difficult to use and this framework changes all of that.

    If you know about the math behind them then you can skip this next section. I wont describe the math but give a vague hand-wavy kind of description of what its all about. The explaination is wrong but its sort of in the ball park to be able to describe it.

    A raster image is a block of pixels represented by numbers for the red, green, and blue components. The sum of all of those numbers makes up the image. But the image can be represented with another completely different set of numbers representing aspects about the image. You can describe the flat areas or the speckled areas of the image and the bits that have vertical lines and the bits that have horizontal lines in it. With enough of these components you can say that a part of an image is sort of flat red with a bit of blue vertical line in it for example. And it turns out that with a set of numbers the same size as you would have had for the pixels, using this other description method you can describe the same image to the exact same degree and authenticity of reproduction as the pixel based image representation. The two sets are a dual of each other - just different.

    So the spatial filter process converts your block of pixels into this alternative universe and then you can mask out or enhance certain values in this block of numbers and then convert it all back to pixels again. As you can imagine, setting up the filters can be tricky. But by changing just one number in this alternative universe of image description it affects every pixel in the image in our normal way of looking at images. So, you can target all vertical blue lines or flat red areas all at the same time with a couple of number changes. In essence its like deconstructing your image into its component parts and then modifying the image based on the components not the pixel position. And that makes them very useful. In fact in some cases they are quite miraculous.

    This framework has a couple of recipes set up with preset filters so you dont have to know a damned thing about how it works and you just put in your image and press Run and it spits out the filtered version. The difficult to set up filter is hidden from you.

    I should also add, for large images, spatial filtering can take a while. Allow it a good couple of minutes to work !

    With that out of the way lets see an example of it working...
    Last edited by Redrobes; 03-17-2021 at 08:43 PM.

  4. #14
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Default

    Recipe: Spatial Filter - Remove Grid

    So this spatial filter can remove a grid from an image. Adding a grid to an image is easy but removing it implies that you have to guess what might have been under the pixels forming the grid. It is true that were guessing. And its also true that if we supress the vertical and horizontal elements in this alternative universe representation of an image then it will remove ALL vertical and horizontal elements in an image whether they were part of the grid or the underlying image in the background. Hence this works better on images where the background is not at all grid like. So dont try it on dungeons !

    I have an image from Tiana to show it to you. I have asked for the permission to use it and I want to use someone elses image instead of my own to show I am not cheating. It turns out that Tiana said that I could have a version wtihout the grid So top tip is first check with the author of a map to see if they might give you one without it ! But lets say you have a map of an old scanned image with a grid you dont want and its from a public domain book, the author is long gone etc then that option wont be available to you.

    So using the recipe couldnt be easier. You just upload your input image and run it until it completes and then you have the result. When you upload an image like Tianas then you can use the attachment ID feature to avoid the slow upload.

    So putting in 125397 into the attachment ID upload box you get Tianas "Dont follow the lights swamp map" with the original grid.
    Attachment 125397

    After processing you have an image like this.
    TianasMapWithNoGrid.jpg

    The grid removal isnt perfect because it depends on just how much of the components of the image you suppress and filter out and that impacts on how much of the good bit of the image you want to keep gets destroyed in the process. But I think you will agree its a pretty impressive algorithm and until this framework it has been hard to access.
    Last edited by Redrobes; 03-17-2021 at 08:46 PM.

  5. #15
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Default

    Recipe: Spatial Filter - Put a ring on it.

    This spatial filtering math is a lot like a hologram (it is a software implementation of a hologram actually) and thats all about light waves. So waves have a big significance to the algorithm. Normally with a badly formed filter you get wave like artifacts around shapes. When you save a JPEG file and you lower the quality to make the file small you get these JPEG artifacts and this is because JPEGs save the images using this alternative universe set of numbers instead of pixel values. So by squashing lots of these numbers out you get artifacts. These artifacts are also known as ringing because the image continues to oscillate beyond the shape you want like a pictorial version of a bell sound.

    Anyway, if I make a bad filter then we can cause ringing and this ringing looks a lot like waves - because they are - and sometimes we map makers want to have waves around our shapes. Often people depict the sea by putting lines around the land masses.

    I have seen a number of maps with odd sharp lines around the land masses and maybe thats what they wanted but this method will generate smooth ones. It will also generate the interferance patterns of the waves too. You may like it, or you may not. But its another arrow in the quiver or tool in the box as they say.

    So taking the instant island land masses if you make them greyscale (Gimp - Image/Mode/Greyscale) and then set the levels so that the land is all white and the sea is all black then it looks like this:
    InstantIslands_12345_2000x2000_BW.png

    If we use that as the input image then after processing it looks like this:
    InstantIslands_12345_2000x2000_BW_Ringing1.png

    A close look at this shows that you have black ringing lines going into the white and white ringing lines going into the black. But they are both following the shapes of the land masses.

    If you take this image and put it back into GIMP you can add it as a layer back on the black and white version and set the layer mix type to lightest. Play around with the levels and then you get this:
    InstantIslands_12345_2000x2000_BW_Ringing2.png

    Then you can take that as a layer and put it over the original colour instant islands map and multiply it in and then it will put on the rings like this:
    InstantIslands_12345_2000x2000_Col_Ringing3.png

    So its fairly trivial to add the rings around your land masses once you can generate them using this tool. So its an option if you want to use it and you like this style of rings.
    Last edited by Redrobes; 03-18-2021 at 08:48 PM.

  6. #16
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Default

    Recipe: Spatial Filter - Enhanced

    This one will simply enhance the detail in the image provided. Its like the sharpen filter on most drawing apps but it does it over a wider range of frequencies. Not a lot more to say than that. Compare it with your favourite image editor results and use your preferred one.

    MonaLisaEnhanced.png

    MonaLisaEnhancedCompare.png
    Last edited by Redrobes; 05-03-2022 at 04:23 PM. Reason: Fixed typo

  7. #17
    Software Dev/Rep heruca's Avatar
    Join Date
    Nov 2006
    Location
    Buenos Aires, Argentina
    Posts
    178

    Default

    This thread is beyond cool. Great stuff, Redrobes!
    Looking for battlemap creation software that can be used to create gorgeous print-resolution output on Windows or Mac OS?
    Give MapForge a try.

  8. #18
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Default

    Hey thanks - and good luck with your new kickstarter too.

  9. #19

    Default

    Nice to see this post here and thanks for sharing this to us.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •