Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 09-05-2019, 19:33   #271
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 5,204
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by nohal View Post
For the size of the vector chart symbols go to Toolbox -> User Interface and move the Chart Object Scale slider to the right.
In my post you quoted I noted I already tried that. Didnít work.
__________________

hpeer is offline   Reply With Quote
Old 09-05-2019, 20:00   #272
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 5,204
Re: Imgkap - kap File Converter Tool

FWIW Iíve posted a request to this thread which addresses my issue with soundings font size/color, also noted by Rgleason.

Sounding size adjustment on Vector Charts - Page 6 - Cruisers & Sailing Forums

Iíll follow that thread for responses in that topic.

Many thanks to all with the offers of help.

Iíll report back here when I have time to work on my imgkap issue.
__________________

hpeer is offline   Reply With Quote
Old 10-05-2019, 01:22   #273
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,180
Re: Imgkap - kap File Converter Tool

In the post I quoted, you wrote, I quote again
Quote:
I looked in the settings/charts/vector settings and adjusted the slider but that doesn’t seem to do anything.
That certainly is a different slider on different tab doing something completely different - adjusting at which scale which level of detail is displayed on CM 93 charts.
nohal is offline   Reply With Quote
Old 10-05-2019, 04:48   #274
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 5,204
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by nohal View Post
In the post I quoted, you wrote, I quote again

That certainly is a different slider on different tab doing something completely different - adjusting at which scale which level of detail is displayed on CM 93 charts.
Yes, I see that now. Thank you.
hpeer is offline   Reply With Quote
Old 14-05-2019, 04:48   #275
Registered User

Join Date: Sep 2013
Location: Sydney
Boat: Chincogan 40
Posts: 20
Re: Imgkap - kap File Converter Tool

Hi,
Having an issue with an image that crosses 180 latitude.
This is one of a dozen commands that has been tried, but failed
./imgkap -n ./Screenshot_2019-05-14_17.tif -34d45.3479 171d25.1083 -47d43.0175 -160d43.0837 ./NZ/NZ.East.kap
returns this message
ERROR - size of image is not correct
width = 2537px LON-degree = 332.136533
height = 1578px LAT-degree = 12.961160
ERROR - imgkap ((null)) return 2
Surely LAT-degree should be 29? 171 to 180 is 9, 180 to 160 is 20, hence 29?

Moved the coordinates east & that worked.
./imgkap -n ./Screenshot_2019-05-14_17.tif -34d45.3479 -179d27.4201 -47d43.0175 -151d37.5988 ./NZ/NZ.East.kap

Have done 15 or 20 other images, all have worked fine. Just this one that crosses hemispheres.

Any idea what I've done wrong?

Cheers
Graeme
Larfalitl is offline   Reply With Quote
Old 14-05-2019, 05:01   #276
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,180
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by Larfalitl View Post
Hi,
Having an issue with an image that crosses 180 latitude.
This is one of a dozen commands that has been tried, but failed
./imgkap -n ./Screenshot_2019-05-14_17.tif -34d45.3479 171d25.1083 -47d43.0175 -160d43.0837 ./NZ/NZ.East.kap
returns this message
ERROR - size of image is not correct
width = 2537px LON-degree = 332.136533
height = 1578px LAT-degree = 12.961160
ERROR - imgkap ((null)) return 2
Surely LAT-degree should be 29? 171 to 180 is 9, 180 to 160 is 20, hence 29?

Moved the coordinates east & that worked.
./imgkap -n ./Screenshot_2019-05-14_17.tif -34d45.3479 -179d27.4201 -47d43.0175 -151d37.5988 ./NZ/NZ.East.kap

Have done 15 or 20 other images, all have worked fine. Just this one that crosses hemispheres.

Any idea what I've done wrong?

Cheers
Graeme
imgkap can't currently handle images crossing the IDL.
nohal is offline   Reply With Quote
Old 14-05-2019, 12:18   #277
Registered User

Join Date: Sep 2013
Location: Sydney
Boat: Chincogan 40
Posts: 20
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by nohal View Post
imgkap can't currently handle images crossing the IDL.
Bugga.
Larfalitl is offline   Reply With Quote
Old 14-05-2019, 13:14   #278
Registered User

Join Date: Jan 2011
Location: UK/France
Boat: Gib'Sea 402
Posts: 338
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by Larfalitl View Post
Bugga.
Slice the image N/S
hoolie is offline   Reply With Quote
Old 16-05-2019, 12:30   #279
Registered User

Join Date: Dec 2005
Location: Helsingborg, Sweden
Boat: Dufour 35
Posts: 3,501
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by nohal View Post
imgkap can't currently handle images crossing the IDL.
@Larfalitl

Well...maybe not as a command-line argument, but if you write your own header-file there is no problem to include the line
Quote:
CPH/180.0
which is all O needs to handle the +/- 180ļ longitude. Alternatively edit the kap file after creating it with imgkap.
Of course this is a bit more complicated....

For reference see https://opencpn.org/wiki/dokuwiki/do...version_manual

Thomas
cagney is offline   Reply With Quote
Old 16-05-2019, 15:08   #280
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 5,204
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by HappySeagull View Post
Ihaven't read everything here but When imgkap gives that message, it means the proportions of the image do not match the latitudes and longitudes you entered.
DO Resize the image...often,usually and always, if the image is nearly correct, imgkap gives the correct pixel sizes of height and width.
(the proportion of a minute of longitude to a minute of latitude at that lat is roughly .4949535)


If the resized image is too distorted, the problem lies with the image itself...for instance I can't see what "projection" the original is. At your high latitude it is less likely it is "simple" mercator and this may cause trouble.
I found this helpful but Iíve not had success yet. I tried again with smaller sections of the image, significantly small portions but it still throws the error. It did make a map file but i didnít try to open it.

It does claim to be a Mercator projection.

I did measure a 1į by 1į square and it is just about 0.5 aspect ratio as you noted.

Out of time to fuss any more at the moment. All my spare time got sucked up adding place locations to the charts and trying to order a data drop for our cabin. I still need to try to plot some routes.

óóóó-

Some misc thoughts that I think might be helpful for other newbies, provided they are correct. Please correct if they are wrong. Itís what Iíve gotten from this thread.

Imgkap runs from the command interface.
Itís helpful to copy the Imgkap.exe to the director where the images to be worked on reside.
Imgkap requires a .png file to work on???
Imgkap requires the upper left and lower right coordinates.
Imgkap then checks the image size (pixels) against the expected size and throws the image size error if itís not within the expected range. No idea what the tolerable +/- variance is.
The image must be a (simple?) Mercator projection.
International Date Line and equator require special handling.

óóó-
Years ago I did some image capture in (sadly now defunct) Fugawi. That process was much different. I donít recall all details but as I recall used a jpg file. You opened the image within Fugawi and ďregisteredĒ the image by inserting 3-4 (I think more were allowed?) points with known lag/Lon. It was best if the points were near the extremity of the image but not absolutely required to be on the corners of the image. Fugawi would then size the image to fit the coordinates. I donít know if it assumed it was a Mercator projection or if it would work at high latitudes or across the International Date Line or Equator.

I just wanted to mention how I saw the image import feature implemented elsewhere.

Thanks.
hpeer is offline   Reply With Quote
Old 16-05-2019, 18:40   #281
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,180
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by hpeer View Post
Some misc thoughts that I think might be helpful for other newbies, provided they are correct. Please correct if they are wrong. Itís what Iíve gotten from this thread.

Imgkap runs from the command interface.
Itís helpful to copy the Imgkap.exe to the director where the images to be worked on reside.
Or put it to any directory being in your PATH environment variable.
Quote:
Imgkap requires a .png file to work on???
No, any normal bitmap format will be equally good.
Quote:
Imgkap requires the upper left and lower right coordinates.
No.
Quote:
Imgkap then checks the image size (pixels) against the expected size and throws the image size error if itís not within the expected range. No idea what the tolerable +/- variance is.
Yes, it checks if the geometry of the image is close to the geometry expected from the calibration points.
Quote:
The image must be a (simple?) Mercator projection.
Yes, the image should represent something using Mercator projection.
Quote:
International Date Line and equator require special handling.
IDL yes, Equator no.
Quote:
óóó-
Years ago I did some image capture in (sadly now defunct) Fugawi. That process was much different. I donít recall all details but as I recall used a jpg file. You opened the image within Fugawi and ďregisteredĒ the image by inserting 3-4 (I think more were allowed?) points with known lag/Lon. It was best if the points were near the extremity of the image but not absolutely required to be on the corners of the image. Fugawi would then size the image to fit the coordinates. I donít know if it assumed it was a Mercator projection or if it would work at high latitudes or across the International Date Line or Equator.

I just wanted to mention how I saw the image import feature implemented elsewhere.
Yes, there are different tools serving different purposes than imgkap.
nohal is offline   Reply With Quote
Old 16-05-2019, 23:39   #282
Registered User

Join Date: Dec 2005
Location: Helsingborg, Sweden
Boat: Dufour 35
Posts: 3,501
Re: Imgkap - kap File Converter Tool

Quote:
Originally Posted by hpeer View Post
..........

It does claim to be a Mercator projection.

............................

Thanks.
I think this is close to the root of the problem. The chart itself is Mercator, but your skewed an probably distorted picture of the chart, is not.

For a different tool, have a look at the wxfax plugin that can make kap charts using two points, on a well formed chart, picked on screen. It can even do limited re-projection from other projections to Mercator.

Thomas
cagney is offline   Reply With Quote
Old 17-05-2019, 04:59   #283
Senior Cruiser
 
hpeer's Avatar

Cruisers Forum Supporter

Join Date: Dec 2008
Location: Philadelphia
Boat: Murray 33-Chouette & Pape Steelmaid-44-Safara-both steel cutters
Posts: 5,204
Re: Imgkap - kap File Converter Tool

Nohal,

Thanks for responses. Not surprised some of my statements were off, EXCEPT for the one about using the upper left and bottom right coordinates. Could you expand your answer please. What coordinate locations are required?

Cagney,

Thanks for the alternative plug in. If I have a chance I may try it.

As to the “distortion” I should have added that the camera position needs to be over the center of what you want to capture and level, in the same plane and square to the image. But also the distance needs to such that you don’t get a fish eye effect.

I’m beginning to think that using an iPhone camera AND/OR trying to do a physically very large chart may be contributing to the problem. If I pull back far enough to flatten the image I loose detail.

I’m sort of trying to gather info in one place for a bit of a tutorial. Obviously I’m not close yet.

Fortunately I’ve found an excellent alternative to get the info I wanted. It’s an iPhone app called PocketEarth. I’ve been using it extensively to have downloadable maps of roads, towns, and amenities (museums, attractions, hospitals, etc.). It also covers Greenland, allowing one to identify occupied areas vs abandoned towns or simple unoccupied place names. It also lets me see which fjiord touch the ice sheet, and can calv ice, vs ones which simply drain. Even better it has a topo plug in. So I’ve got the info I was looking for.
hpeer is offline   Reply With Quote
Old 17-05-2019, 08:46   #284
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,180
Re: Imgkap - kap File Converter Tool

From the imgkap help you get every time you run the program without parameters:

Code:
	lat0 lon0 is a left or right,top point
	lat1 lon1 is a right or left,bottom point cater-cornered to lat0 lon0
	lat to be between -85 and +85 degree
	lon to be between -180 and +180 degree
	    different formats are accepted : -1.22  1į10'20.123N  -1d22.123 ...
	x;y pixel points can be used if lat lon defines not the image edges.
	    lat0 lon0 x0;y0 must be in the left or right, upper third
	    lat1 lon1 x1;y1 must be in the right or left, lower third
nohal is offline   Reply With Quote
Old 19-05-2019, 08:35   #285
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,400
Re: Imgkap - kap File Converter Tool

The image you posted in post 248 is horrendous. Non-rectangle.
You will need skills of image manipulation to fix it.



BUT imgkap can "calibrate" blank sheets of paper or photographs or anything if they have 90 degree square corners AND the proportions are correct per simple Mercator latitude versus longitude...use the central latitude and longitudes to discover proportions. eg (Lat1-lat2)/2 and (long1-long2)/2
again, the cos of the latitude determines the proportion of the 1 longitude degree to 1 latitude degree.
in YOUR case given that your chart covers "61:20N 44:50W
59:20N 42:10W
" thats 2 deg of lat and 2.666666667 deg of long


The cosin of central latitude(which is the "average")=cos60.33333=.4949532353
that is, any measure of a degree of latitude corresponds to .4949532353 of the same measure of degrees in longitude...so,
The height is 2 degrees of latitude and I'm going to use 2000 pixels height as an example because your picture is thrashed, so, a single degree along the width will be .4949532353 x(2000/2) pixels =495 pixels... and since the top covers 2.666666667 degrees of longitude, the top must therefore be 1320 pixels....
You can put your own pixels in of course...


PS...you can indeed arrive at correct dimensions and correct corners using any correctly mapped 2 pixels ANYWHERE in an image...I think I posted a way earlier in the thread, but maybe not.
__________________

HappySeagull is offline   Reply With Quote
Reply

Tags
imgkap

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Development Debugging Environment - Setup Help rgleason OpenCPN 589 15-10-2018 04:49
OpenCPN Beta Version 3.1.814 Released bdbcat OpenCPN 185 14-09-2012 07:43
Route File Transfer via SDcard to Garmin 441s four winds Navigation 11 25-02-2012 08:34
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 21:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 23:06.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.