Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 18-06-2012, 04:01   #1
Registered User
 
titaantje's Avatar

Join Date: Jan 2012
Location: Netherlands
Boat: North Beach 24
Posts: 28
libbsb error

I used to scan stitch and then convert my charts into .kap format using libbsb.
I don't know what caused it but this last step is producing a weird result.
The scale isn't right, although I did in the previous step accurate georeferencing (Mapcal). Only half of the chart is visible and it is twice as wide as it should be.
I don't have a clue what can be wrong. Any help would be appreciated.

I am running fedora 17, OpenCPN 3.0, libsb-0.0.7

Example:

[peter@cello waddenzee]$ tif2bsb -c 127 DENHELDKORNW.hdr DenHeldKornw.tif DenHeldKornw.kap
*** glibc detected *** tif2bsb: double free or corruption (!prev): 0x00000000017b2970 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3515e7c80e]
tif2bsb[0x401062]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x3515e21735]
tif2bsb[0x401271]
======= Memory map: ========
00400000-00403000 r-xp 00000000 fd:00 1203397 /usr/local/bin/tif2bsb
00602000-00603000 rw-p 00002000 fd:00 1203397 /usr/local/bin/tif2bsb
017a5000-017f1000 rw-p 00000000 00:00 0 [heap]
3515600000-3515620000 r-xp 00000000 fd:00 1704095 /usr/lib64/ld-2.15.so
351581f000-3515820000 r--p 0001f000 fd:00 1704095 /usr/lib64/ld-2.15.so
3515820000-3515821000 rw-p 00020000 fd:00 1704095 /usr/lib64/ld-2.15.so
3515821000-3515822000 rw-p 00000000 00:00 0
3515e00000-3515fac000 r-xp 00000000 fd:00 1704128 /usr/lib64/libc-2.15.so
3515fac000-35161ac000 ---p 001ac000 fd:00 1704128 /usr/lib64/libc-2.15.so
35161ac000-35161b0000 r--p 001ac000 fd:00 1704128 /usr/lib64/libc-2.15.so
35161b0000-35161b2000 rw-p 001b0000 fd:00 1704128 /usr/lib64/libc-2.15.so
35161b2000-35161b7000 rw-p 00000000 00:00 0
3516a00000-3516afa000 r-xp 00000000 fd:00 1712092 /usr/lib64/libm-2.15.so
3516afa000-3516cf9000 ---p 000fa000 fd:00 1712092 /usr/lib64/libm-2.15.so
3516cf9000-3516cfa000 r--p 000f9000 fd:00 1712092 /usr/lib64/libm-2.15.so
3516cfa000-3516cfb000 rw-p 000fa000 fd:00 1712092 /usr/lib64/libm-2.15.so
3517200000-3517217000 r-xp 00000000 fd:00 1709099 /usr/lib64/libz.so.1.2.5
3517217000-3517416000 ---p 00017000 fd:00 1709099 /usr/lib64/libz.so.1.2.5
3517416000-3517417000 rw-p 00016000 fd:00 1709099 /usr/lib64/libz.so.1.2.5
3517e00000-3517e15000 r-xp 00000000 fd:00 1712434 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3517e15000-3518014000 ---p 00015000 fd:00 1712434 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3518014000-3518015000 rw-p 00014000 fd:00 1712434 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3522600000-3522661000 r-xp 00000000 fd:00 1712944 /usr/lib64/libtiff.so.3.9.5
3522661000-3522861000 ---p 00061000 fd:00 1712944 /usr/lib64/libtiff.so.3.9.5
3522861000-3522863000 r--p 00061000 fd:00 1712944 /usr/lib64/libtiff.so.3.9.5
3522863000-3522864000 rw-p 00063000 fd:00 1712944 /usr/lib64/libtiff.so.3.9.5
3526a00000-3526a3e000 r-xp 00000000 fd:00 1712812 /usr/lib64/libjpeg.so.62.0.0
3526a3e000-3526c3d000 ---p 0003e000 fd:00 1712812 /usr/lib64/libjpeg.so.62.0.0
3526c3d000-3526c3e000 r--p 0003d000 fd:00 1712812 /usr/lib64/libjpeg.so.62.0.0
3526c3e000-3526c3f000 rw-p 0003e000 fd:00 1712812 /usr/lib64/libjpeg.so.62.0.0
3526c3f000-3526c4f000 rw-p 00000000 00:00 0
7fabcac9e000-7fabcc6cc000 r--s 00000000 fd:02 18874900 /home/peter/Pictures/waddenzee/DenHeldKornw.tif
7fabcc6cc000-7fabcc6d0000 rw-p 00000000 00:00 0
7fabcc6ee000-7fabcc6f1000 rw-p 00000000 00:00 0
7fffd3ada000-7fffd3afb000 rw-p 00000000 00:00 0 [stack]
7fffd3bff000-7fffd3c00000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted
__________________

__________________
titaantje is offline   Reply With Quote
Old 18-06-2012, 11:07   #2
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: libbsb error

Is this the first conversion on fedora 17 ?

Take a well working kap file and do the round trip -> bsb2tiff -> tiff2bsb
Any problems?
Where is your libbsb coming from? If this is a problem that has come with Fedora 17, try to compile from source. Any change?

I'm using imgkap these days, easily compiled on linux. Does a kap directly from most file formats. No more need to convert to a tif.

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 19-06-2012, 06:47   #3
Registered User
 
titaantje's Avatar

Join Date: Jan 2012
Location: Netherlands
Boat: North Beach 24
Posts: 28
Re: libbsb error

Thanks for your reply.
Yes, first conversion since upgrading to fedora 17.

Reading about imgkap is making me enthousiastic. It would be a great alternative for my problems with libbsb and besides ... a much quicker method to convert a scanned image into a .kap file.

Compiling imgkap.c gives me this (dependencies freeimage and freeimage-devel are installed):

]$ gcc imgkap.c -O3 -s -lfreeimage -o imgkap
imgkap.c: In function ‘kaptoimg’:
imgkap.c:1348:67: error: ‘FI_COLOR_IS_RGB_COLOR’ undeclared (first use in this function)
imgkap.c:1348:67: note: each undeclared identifier is reported only once for each function it appears in
imgkap.c: In function ‘imgheadertokap’:
imgkap.c:1549:75: error: ‘FI_COLOR_IS_RGB_COLOR’ undeclared (first use in this function)

Since my knowledge of linux is limited this makes no sense to me.
I will give it another try on my notebook with ubuntu.

Peter
__________________
titaantje is offline   Reply With Quote
Old 19-06-2012, 09:47   #4
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: libbsb error

What response do you get from the command
Quote:
locate FreeImage.h
Thomas
__________________
cagney is offline   Reply With Quote
Old 19-06-2012, 12:03   #5
Registered User
 
titaantje's Avatar

Join Date: Jan 2012
Location: Netherlands
Boat: North Beach 24
Posts: 28
Re: libbsb error

Here is the output:

$ locate FreeImage.h
/usr/include/FreeImage.h
__________________
titaantje is offline   Reply With Quote
Old 20-06-2012, 10:11   #6
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: libbsb error

It seems to me that there is a problem with Fedora 17 or your installation.Your compile errors are strange. I have nothing like that at all compiling on Ubuntu 12.04. Check dedicated Fedora forums!

Thomas
__________________
cagney is offline   Reply With Quote
Old 24-06-2012, 03:31   #7
Registered User
 
titaantje's Avatar

Join Date: Jan 2012
Location: Netherlands
Boat: North Beach 24
Posts: 28
Re: libbsb error

I compiled imgkap on Ubuntu: no problems.
I did several conversions chart.png --->chart.kap succesfully.

Sometimes imgkap is complaining about the size of the image:

$ ~/Downloads/imgkap TH.png 53.408333 5.03 53.066666 5.436666 TH.kap
ERROR - size of image is not correct
Extend widthin 5312 heightin 7936 to widthout 5667 heightout 7936
ERROR - imgkap return 2

The first position is the top left corner of the chart, the second the right bottom corner. I checked the coordinates.
Don't understand the error.

Peter
__________________
titaantje is offline   Reply With Quote
Old 24-06-2012, 03:40   #8
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: libbsb error

Peter...
The error means what it says - The aspect ratio of the coordinates does not correspond to the aspect ratio of the image. Without seeing your image and checking the coordinates, nobody can tell you more.
From what I've seen so far, imgkap was always right with this message, while users insisting on having the coordinates right always wrong...

Pavel
__________________
nohal is offline   Reply With Quote
Old 24-06-2012, 04:03   #9
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: libbsb error

Peter

The mode of imgkap that you are using, assumes that the corners of the chart are the same as the corners of the image. (IIRC !!)
In your case there probably is some whitespace in the picture, outside the chart proper.
Though I use imgkap quite a lot, I always use the mode where you have to supply the header file yourself (extension ".txt"), as this gives you full control of the chart creation and all the chart attributes.

Thomas
__________________
cagney is offline   Reply With Quote
Old 27-06-2012, 12:16   #10
Registered User
 
titaantje's Avatar

Join Date: Jan 2012
Location: Netherlands
Boat: North Beach 24
Posts: 28
Re: libbsb error

I tried to use imgkap with a "home-brewn" header file (chart.txt) ....and it works!
Thanks for your answers.

Peter
__________________

__________________
titaantje is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.