Sign in to follow this  
Guest JohnC

Converting to 4.8m/pixel

Recommended Posts

Hello all,I have an image which I want to convert so that it will be of a 4.8m/pixel resolution... What would be the best way to accomplish this? I have no idea on how to do this....Once I have the image at the 4.8m/pixel resolution, I will crop out a 1024x1024 image of the area I want to display on FS2002... Thanks for any help!

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hello Efrain,The first thing that you have to do is determine the resolution of your image. Either you already know this or you must calculate it.It is generally easy to calculate simply by looking for landmarks with known sizes, for example, a runway or a footbal field. Then, just count the pixels and do the simple calculation.Then, the easiest way to find the new size of the picture in order to get the 4.8 meters per pixel is to use "ImageSizeCalc" by Elrond Elvish. This handy utility will calculate the new image size that will give you the required resolution.This program is not available in the library, I think (although I could be wrong), but Elrond had put a link to it here in this forum. Just search this forum for it and you will find it (if the archived forum is still available.) The link may or may not be valid. Elrond, could you please help this guy out?Finally, use your favorite image editing program to resize your image.Please note that, despite what we thought a few months ago, 4.8 meters per pixel is not the standard resolution required for creating ground textures. In fact, resolution varies depending on latitude, so your image will be resized by the Microsoft Resample program anyway.Paul Leatzaw once recommended sharpening the image before resampling and this is probably a good idea, in order to mitigate the unwanted efects of the resizing and resampling process.Best regards.Luis

Share this post


Link to post
Share on other sites

Thanks Luis!!! But unfortunately, I have looked all over the place for this utility made by Elrond and have not been able to find it...Also, everytime I try to compile the Terrabuilder Scenery, I keep getting an error which says it cannot find the .IMF files... How do I overcome this error? The textures are placed in the correct /Texture folder but can't get it to compile the .BGL file...Thanks for any help on both issues mentioned above...

Share this post


Link to post
Share on other sites

Another thing Luis, I have read that the main bitmap must be a 24bit color image but if I leave it as 24bit, Terrabuilder will not accept it... What's the take on this?

Share this post


Link to post
Share on other sites

Hello Efrain,Right, let's see if we can get all this sorted out.I can send you Elrond's great utility if you will give me an address. It is 326 KB.The image must be RGB - this is a requirement of the Microsoft Resample program, not TerraBuilder.If TerraBuilder rejects the image, then I suspect that is because you are not using the correct wizard. Please do NOT use PhotoWizard -- use PhotoTerrain, instead.Also, do not crop your image to a multiple of 256 pixels. Ground textures are aligned to a fixed geographical grid in Flight Simulator, and you risk eliminating most of your picture from the ground textures. In fact, it is best to extend your image at least 1 kilometer from the edges of your desired image in order to get all of it converted.As for your problem with the inf file, TerraBuilder has been known to fail for a very few users - perhaps this depends on the OS and some console variables. I thought that Misho had modified the bat file and eliminated the problem.Give PhotoTerrain a try and, if you still have a problem with the inf file, just let us know and we shall find a fix for you.Best regards.Luis

Share this post


Link to post
Share on other sites

Hi Luis,If you are sending out ImageSizeCalc, please include me at wsieffert@cfl.rr.comThanks,

Share this post


Link to post
Share on other sites

Guys, you are making a simple thing complicated.TerraBuilder contains all the neccessary functions to do this - that's why I put them in there. Simply create a TB project, define extents (by entering the coordinates) and select "Scenery Issues" button in the upper right corner. There, you will find instructions on what to do and to what size to resize your image to make it 4.8 m/pixel.

Share this post


Link to post
Share on other sites

Yup! One big mistake was that I was using the wrong wizard! DUH!!! Now it compiled without a problem! But I still need that little app my friend!Here is my email: efrainruiz@aavirtual.comAnother thing, you say not to crop to a multiple of 256.. Do you also mean resize? Does this mean I don't have to make my image a minimum of 1024x1024? That confused me somewhat... Thanks for any help again!

Share this post


Link to post
Share on other sites

Thank you for clearing this up, Misho. I have not yet gotten the latest version of TerraBuilder - the previous version works just fine and my very slow modem makes downloads quite painful.Efrain, the previous method for making ground tiles (PhotoWizard) required a very precise image size (multiple of 256 pixels) that fit exactly in the tile.The new method using Microsoft Resample program (PhotoTerrain) no longer requires this.As you should be able to see in the main window of TerraBuilder, there is a grid aligned on your picture. This is the LOD (Level of Detail) 13 grid as used by Flight Simulator for the creation of ground textures. It is about 1.2 kilometers to a side (but, this really depends on latitude). This grid is fixed to the geographic coordinate system used in the game. Any part of your picture that does not fill an entire LOD13 area will be cropped and will not be converted to ground textures.The easiest way to ensure that all of your picture is converted is to extend your picture on all sides by 1.2 km., thereby ensuring full coverage.So, do not crop your picture to a multiple of 256 pixels.However, you can resize it in order to get the target resolution of 4.8 meters per pixel. (Two different concepts: crop and resize.)However, as I mentioned, the true resolution of ground tiles is not 4.8 meters per pixel. In the latest SDK documents, Microsoft now states something like 4.76 meters per pixel.In any case, even if you resize the image to 4.8 meters per pixel, the Resample program will again resize it to the correct resolution.This does not mean that you should not carry out the first resize operation, however. It has been determined that Resample uses a very simple method for resizing, so you are better off using a more sophisticated method in a good image editing program.Then, when Resample resizes the image, it will create less distortion than otherwise.Give it a try and see how it works.Any problems, just come back here and ask.Best regards.Luis

Share this post


Link to post
Share on other sites

Great explanation my friend!! I'm am getting to understand this a bit better now... Ok, you say that the MS SDK states that the resampler actually resizes it to 4.76m/pixels instead of 4.8? I guess it would be even better for to me just resize my image to this resolution instead of the 4.8m/pixels... Just speculating as I have not tried it yet...

Share this post


Link to post
Share on other sites

Hi Efrain.I can confuse you even further. :)Resample will slice the source into LOD13 sized images of 256x256 pixels. The size of the displayed image is measured in degrees, not meters.The size of a slice is 0.010986328125 degrees Latitude by 0.0146484375 degrees Longitude. This is LOD13. It's EW width in meters narrows as you approach the north or south pole, because the meridians of longitude meet at the poles.The NS distance never changes, as lines of Latitude are parallel. So the NS distance of a pixel is always 4.76920604705810546875 meters/pixel.The 4.77 meters/pixel is close for latitudinal length, but a very rough average for longitudinal width. Dick

Share this post


Link to post
Share on other sites

LOL! I hear ya!!! Can get quite confusing...Ok, now let me bombard you and Luis with some details...I have a few aerial color images on FILM which say that are at a resolution of 1:20,000What exactly does this mean??? The image does look like it was shot a few thousand feet high above the terrain...What is the optimal bitmap size which one should try to stick with.. I have read that if the image is too small (too small coverage). it can display incorrectly... What would be the ideal size if there is one...Also, when scanning the 1:20,000 image film, what would be th best resolution to SCAN them at? Can I possibly scan them and wind up with the 4.8m/pixels right off the bat?Thanks again fellows, you guys are awesome!

Share this post


Link to post
Share on other sites

Thank you, Dick, for the clarification.And, this is precisely the point. What we now need is to realize that resizing of the image must be carried out independently on both the horizontal and vertical dimensions as a function of latitude.Or, just let Resample handle it. In which case, it really helps to sharpen the picture first.Efrain, 1:20000 simply means that every inch (or cm.) on that paper map (or picture) represents 20000 in reality. Although, I did not know that aerial images were described in this manner.Generally, a picture of between 4 to 5 meters per pixel will give you the best results, because it is already close to the target resolution.However, if you have a 1 meter per pixel image, then this is much better than having a 16 meter per pixel image, because in the first case, you have more resolution than you need, whereas in the second case, you do not have enough.It is probably better to scan your image at its highest resolution without resizing in the scanning process, and then edit and resize it in a good editing program, like PhotoShop. This way, you have the best quality with which to work from the outset.In a good picture, you can make out streets, houses, parks, golf courses, stadiums, etc. It should preferably be sharp and have good contrast with well-balanced colors.This is pretty hard to find, so usually you must do some basic image editing to enhance (or even color) the picture.Best regards.Luis

Share this post


Link to post
Share on other sites

Hi Efrain.As Luis indicates, you'd want to scan the photos at the highest resolution your scanner can handle. The more detail/pixel is what you want.If the photo is 1:20000, then 1cm = 200 meters. 1 inch = 2.54cm = a photo scale of about 508 meters.I don't know the DPI capability of your ( dots per inch ), but if it were 150 DPI, then ( 508/150 = 3.386 meters/pixel )... and that's pretty close to what resample will use. If your scanner is rated in dots per centimeter, then you'd want at least 40 DPC, or finer if you can get it.Whatever you scan at, you'll need to know the latitude and longitude of at least 2 known points, and the size of the bitmap. Then TerraBuiulder can make the slices from that info.Misho might have a tip for you here, about Terrabuilder's ability to calculate the bounds of the image automatically.Hopefully, the photo is close to "top-down" and with very little lens distortion near the edges. Then you should be able to get the placement pretty close.Dick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this