![]() |
Re: Images of Westeros, somebody make a map out of
Placing 2500 individual provinces in a map would take huge amounts of time. I can't see how anyone could finish making a map where thy intend to place 2500 provinces, which i assume one would do if one made the westeroes map playable.
I would probably not play a map of similar proportions, but I imagine there are those who would. But playing might be more rewarding then placing and naming provinces. http://forum.shrapnelgames.com/images/smilies/happy.gif |
Re: Images of Westeros, somebody make a map out of
The westeroes map doesn't inherently have 2500 provinces. If you look at the boardgame version it has like 50.
It can have as many provinces as the mapper wants it to have. I think 100 or so would fit well on the map. |
Re: Images of Westeros, somebody make a map out of
As much as I love huge maps, and do play 1500 maps, I would advise against increasing the size again. The last increase involved far more than we expected. The game crashed over some of the strangest things and we had to increase many arrays that we did not expect to be affected.
|
Re: Images of Westeros, somebody make a map out of
I am definitely a fan of large maps, and thank you Ich for that province count. How did you determine the number approximately? I figured I was over, but fortunately I am OCD enough and love A Song of Ice and Fire enough that I'll just redraw it with fewer provinces http://forum.shrapnelgames.com/images/smilies/happy.gif Probably on the image you posted too. It's much cleaner, maybe add in some of the labels that are on the image I used. Oh well, back to work.
|
Re: Images of Westeros, somebody make a map out of
The Oeridia (sp?) map has 1225 provinces, and is freaking enormous, complex, and lots of fun, but perhaps a bit much.
|
Re: Images of Westeros, somebody make a map out of
Quote:
To get the number of pixels of any color, you could do the following for example: - install ImageMagick - run it like 'identify -verbose Westeros.bmp' - look for the row titled "(255,255,255) #FFFFFF white" in the color histogram, the number in front is the pixel count (If you're on *nix: 'identify -verbose Westeros.bmp | grep white') |
Re: Images of Westeros, somebody make a map out of
Quote:
|
Getting the number of provinces in an image
Ok, apparently the solution that I provided to count the number of provinces doesn't work because ImageMagick refuses to generate a histogram for an image as big as Westeros.bmp.
What I used to count the number of pixels was some small Python program. It uses PIL, the Python Imaging Library. Here's my code: <font class="small">Code:</font><hr /><pre>from PIL import Image img = Image.open("Westeros.bmp") (xdim, ydim) = img.size # yeah, this is a hackish way to do things channels = len(img.getbands()) white = tuple([255]*channels) count = 0 if Image.VERSION >= "1.1.6": data = img.load() for y in range(ydim): for x in range(xdim): if data[x,y] == white: count += 1 else: data = img.getdata() for y in range(ydim): for x in range(xdim): if data[x+y*xdim] == white: count += 1 print count, "provinces"</pre><hr /> This takes about 30 seconds to complete, because of the for loops which do the pixel checks. There are ways to speed this up. First, you could consider mapping to the luminance: <font class="small">Code:</font><hr /><pre>from PIL import Image count = list(Image.open('Westeros.bmp').convert('L').getda ta()).count(255) print count, "provinces" </pre><hr /> This takes half as long, but the conversion from the internal PIL format to Python data containers still takes too long. If you want to make full use of the underlying C code that PIL is built on, then you can do the following: <font class="small">Code:</font><hr /><pre>from PIL import Image count = Image.open('/home/lch/dominions3/maps/Westeros.bmp').convert('L').histogram().pop() print count, "provinces"</pre><hr /> This takes less than a second on the Westeros.bmp for me. The way that I am getting the information that I want here, over histograms, can be done with image editing programs, too. Just look where your image editing program has the Histogram function, and set it to Luminance/Value. Then enter a range of 255-255 (or pick the pure white color) and it should tell you the number of provinces. GIMP seems to have a bug, though: Although it does work correctly with other map images that I have tried, it reports something like 12038 pure white pixels here, which clearly is wrong. Instructions for GIMP: - open image - open Histogram: either through "Colors > Info > Histogram" or "Dialogs > Histogram" - change channel to "Value" - enter 255 as left and right limit - look at "Count" value Workaround for GIMP: - open image - choose "Select > by color" (Shift+O) - select a pure white pixel - choose "Edit > Copy" (Ctrl+C) - choose "Edit > Paste as > New Image" - do the above, but with 0 and 255 as limits for the range |
Re: Getting the number of provinces in an image
Thanks Ich, that'll help a lot when I'm redrawing the map. Much appreciated.
|
All times are GMT -4. The time now is 02:32 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.