Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rating: Thread Rating: 4 votes, 2.00 average. Display Modes
Old 16-10-2009, 11:51   #151
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Marco ... Dan..

Still having trouble converting from 256 .tif to 127 color .tif in palette mode.
I am using this command: convert Hamburg.gif -auto-level -colors 127 Hamburg127.tif having first converted the original .tif file to .gif.

Just managed the conversion using GIMP instead as Marco advised.
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 16-10-2009, 12:14   #152
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Marco..

The final Hamburg127.tif is now definitely in a 127 level palette modus.
I converted to Hamburg127.kap using:'tif2bsb -c 127 headerhamburg.kap Hamburg127.tif Hamburg127.kap'

My headerhamburg.kap file is made up like this:

Quote:
VER/2.00
BSB/NA=Hamburg port,NU=,RA=2400,1675,DU=60
KNP/SC=25000,GD=WGS84,PR=MERCATOR,PP=53.0,PI=0.0,SP=
SK=0.0000000,TA=00,UN=METERS,SD=MEAN LOW WATER SPRINGS
DX=5.0,DY=5.0
CED/SE=2002,RE=1,ED=2009
REF/1,943,280,53.5394,09.9052
REF/2,1266,727,53.5145,09.9354
REF/3,1982,513,53.5266,10.0026
REF/4,1451,288,53.5391,09.9527
PLY/1,53.5551,10.0414
PLY/2,53.5551,09.8168
PLY/3,53.4616,09.8168
PLY/4,53.5616,10.0414
AND,yes you've guessed, it still does NOT display in OpenCPN???
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 16-10-2009, 13:02   #153
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Marco .. Dan..

I feel I'm on a 'wild-goose chase' here,getting nowhere..
I am converting all kinds of map files into RGB and then palette modus with 127 colors selected. OK,now I have a .bmp or .tif file in RGB and 127 colors. BUT, the moment you save the .tif file it reverts to 256 colors. The .bmp file retains the 127 colors but in order to run the tif2bsb conversion I MUST have a .tif file in 127 colors.

I am still confused about the 127/256 color issue,as all my successful NZ charts were all converted using 256 color .tif files. (Dave,how about that bitmap calibration facility for OpenCPN?)
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 17-10-2009, 01:32   #154
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by sinbad7 View Post
Marco .. Dan..

I feel I'm on a 'wild-goose chase' here,getting nowhere..
I am converting all kinds of map files into RGB and then palette modus with 127 colors selected. OK,now I have a .bmp or .tif file in RGB and 127 colors. BUT, the moment you save the .tif file it reverts to 256 colors. The .bmp file retains the 127 colors but in order to run the tif2bsb conversion I MUST have a .tif file in 127 colors.

I am still confused about the 127/256 color issue,as all my successful NZ charts were all converted using 256 color .tif files. (Dave,how about that bitmap calibration facility for OpenCPN?)
Hi Tore,

I'm not sure I understand your issue. Moreover, I coverted and loaded hamburg.tif at the first shot without any issue.

tif files can be saved in RGB (24bpp), 256 colours (8bpp), 16 colours (4bpp), B/W (1bpp).

24bpp (bit per pixel) means tiff has 3 bytes per pixel (one for red, one for green, one for blue)

8bpp means tiff stores 1 byte (256 possible values) per pixel. In this case a palette is used (a table that coverts each of the levels used for the pixels in one RGB colour). Well, you can have UP TO 256 colours. But of course you can have less than 256 colours. For example you can have a palette with only 127 colours (the remaining 129 possible colours will be UNUSED). This is the exact format you have to use: a 256 tif file with maximum 127 colours used.

4bpp: if the image has 16 or less colours, you can save the tiff in 4bpp. This just save space since file will be smaller.

1bpp: pure B&W. Not grey scale, just black OR white pixels. Like a FAX.

The reason you succeded with NZ charts is maybe that those charts have 7 colours only so you don't need any conversion or colour reduction.

Last thing: remember that if you put a new .kap chart in the OCPN chart dir, this new chart will not be seen by OCPN (even if you restart OCPN). You must open the chart selection tab, delete the dir from the OCPN charts list, then press OK!. Then you need to reopen the tab and reload the dir in the OCPN charts dirs.

For Dave: why not putting a "rescan dirs for new maps" button in the chart dirs selection tab?

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 17-10-2009, 03:51   #155
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Marco..

Thank you for the general color type orientation,but that is not the problem.
As I mentioned,the .tif conversion to 127 colors works fine on-screen but as
soon as I've saved the file it reverts to 256 colors?? This is the main issue here.

One other point. Since the .tif file is required to be in 127 colors BEFORE the tif2bsb conversion procedure,WHY is the conversion to 127 colors required AGAIN in the command line? i.e. 'convert Hamburg.gif -auto-level -colors 127 Hamburg127.tif'

The map entry sequence in OpenCPN is followed exactly as you mention,all previous maps are deleted and confirmed,starting a new run with ONLY cm93 and the new map.

I have tried the Hamburg conversion I am sure a dozen times without success,only now and again getting the red outline frame but no map.

I am fairly computer literate but this has really got me puzzled...

Thanks for your patience and suggestions.
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 17-10-2009, 04:02   #156
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Sinbad, I feel that with all your problems, you need to go back to the installation/configuration of libbsb. Possibly something wrong there. After all, Dacust doesn't seem to have any problems with producing .kap files that displays properly in OCPN.

Thomas
cagney is offline   Reply With Quote
Old 17-10-2009, 04:22   #157
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Ok Tore, I downloaded your hamburg.tif, copy pasted your template, run tif2bsb, loaded in OCPN.

First: the Hamburg.tif is good (127 colours). But I found one error: in your template, last row is wrong!

PLY/1,53.5551,10.0414
PLY/2,53.5551,09.8168
PLY/3,53.4616,09.8168
PLY/4,53.5616,10.0414

It should be:
PLY/4,53.4616,10.0414

Now, since I sent you in post #145 the template to use, and it was without the error I discovered in your template, I ask you: how did you introduce such error? I think that a copy-paste into a text editor is simple enough and do not introduce such errors...

Anyway, as you may immagine, the map loads in OCPN without problems.

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 17-10-2009, 04:42   #158
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Marco...

HALLELUJAH!! It worked at last... I used the header you sent me originally,plus the Hamburg.tif file downloaded from my dropbox,and, hey presto!! it worked...

On the other hand. Inspecting the same Hamburg.tif file with ImageMagic 'identify -verbose Hamburg.tif' and also in GIMP, they both show the file as 256 colors??
Thanks for all your hard work on this...'
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 17-10-2009, 05:44   #159
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by sinbad7 View Post
Marco...

HALLELUJAH!! It worked at last... I used the header you sent me originally,plus the Hamburg.tif file downloaded from my dropbox,and, hey presto!! it worked...

On the other hand. Inspecting the same Hamburg.tif file with ImageMagic 'identify -verbose Hamburg.tif' and also in GIMP, they both show the file as 256 colors??
Thanks for all your hard work on this...'
Very well.

As I said before, one thing is the colour space (256 levels) one thing is the number of colours effectively used by an image. To check in GIMP:

Colors->Info->Colorcube Analysis

You will see something like the image I attach.

Ciao, Marco.

Click image for larger version

Name:	colori.jpg
Views:	250
Size:	101.0 KB
ID:	10549


GPS-Marco is offline   Reply With Quote
Old 17-10-2009, 07:42   #160
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Think I'm getting the hang of it now.. just did Plymouth harbor..
I've copied the latest template and will use it EXACTLY the same apart from the geo locs etc. in future conversions to be on the safe side.

Thanks Marco and Dan for all your patience and advice.
Attached Thumbnails
Click image for larger version

Name:	PLYMOUTH HARBOR.jpg
Views:	267
Size:	289.8 KB
ID:	10551  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 17-10-2009, 07:55   #161
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
World / Overview charts.

I find the default black background with blue vector lines confusing as a world overview chart. Also, it consumes too many cpu cycles when zoomed out far. Perhaps we can create an overview bsb from NOE imagery that would be better:


Large geotiff:
http://neo.sci.gsfc.nasa.gov/RenderD...gb&format=TIFF

OR

Large geotiff:
http://neo.sci.gsfc.nasa.gov/RenderD...gb&format=TIFF

GPSMarco and Cagney, I think I'm georefferencing this right ... process:

convert 189313rgb.TIFF -colors 127 bathy.tif
tif2bsb bathy.kap.txt bathy.tif bathy.kap

result: notice the difference in position of ship (which hasn't changed) when changine to cmap overview.



any thoughts? (I'm not very well versed on map projections ... here is info on the original geotiff: gdalinfo readout bathy-tiff-info.txt
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 17-10-2009, 08:04   #162
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Quote:
Originally Posted by manimaul View Post
World / Overview charts.

...

result: notice the difference in position of ship (which hasn't changed) when changine to cmap overview.

...

any thoughts?
I think it probably requires many more reference points. But I don't know if OpenCPN stretches and skews based on that, so even that might not work.

I like it, though.

-dan
dacust is offline   Reply With Quote
Old 17-10-2009, 08:14   #163
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Marco..
Quote:
On the other hand. Inspecting the same Hamburg.tif file with ImageMagic 'identify -verbose Hamburg.tif' and also in GIMP, they both show the file as 256 colors??
I guess I used the wrong area of GIMP to check the color level. Using Image/Image properties it shows 256... Can not understand why the ImageMagick command line should show all of 256 levels though. EVERY level is shown from 1-256..
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 17-10-2009, 08:29   #164
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by sinbad7 View Post
Marco..
I guess I used the wrong area of GIMP to check the color level. Using Image/Image properties it shows 256... Can not understand why the ImageMagick command line should show all of 256 levels though. EVERY level is shown from 1-256..
Sinbad7: read my post #159

To Manimaul: as far as I've understood, OCPN only handles MERCATOR projections. All other projections will be displayed with errors. You can minimize errors with more reference points, but for a world map I think there is no way to reduce error to acceptable level. Maybe its better to find a mercator projected map. Moreover I don't think OCPN can use an image as background.

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 17-10-2009, 08:29   #165
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Blue Marble background...

Manimaul....

Nice pix!

However, these are not Mercator projections, so opencpn will not be able to georef them accurately, no matter how many REF points are used. The latitude range is too wide

Now, if we can find a nice Mercator worldview, we may be able to use it.

It is on my list to improve the current blue WorldVectorShoreline rendering. I agree that it takes too many cycles zoomed out.

Thanks
Dave
bdbcat is online now   Reply With Quote
Reply

Tags
charts, kml, raster2bsb, tiff2bsb, bsb


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Charts on CD stxboy Navigation 43 28-01-2014 10:40
Charts for BC Charlie Navigation 11 19-04-2007 03:39
Used Charts daven Navigation 2 28-11-2006 16:47
Looking at charts - where to go to next Rippy Other 19 10-03-2006 04:27

Advertise Here


All times are GMT -7. The time now is 07:11.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.