keesverruijt / BR24radar_pi

OpenCPN radar plugin for Navico Broadband Radars (BR24, 3G, 4G models) [HISTORIC]
17 stars 26 forks source link

Transparency of radar image not consistent across entire image #15

Closed hduerr closed 10 years ago

hduerr commented 10 years ago

The transparency increases towards the edge of the radar image (it is more translucent farther away from the boat). I don't understand the reasoning behind this (if there is any) and propose to use the same transparency across the entire radar image.

keesverruijt commented 10 years ago

This is an artefact of how we draw the radar blobs (using lots of triangles), and I don't really understand this either. My OpenGL skills are very low, but maybe this is simple to fix.

guymadison commented 10 years ago

Why not draw the radar blobs to a texture using a framebuffer object without transparency then draw the texture as an overlay with transparency.

Guy

On Apr 21, 2014, at 12:36 PM, canboat notifications@github.com wrote:

This is an artefact of how we draw the radar blobs (using lots of triangles), and I don't really understand this either. My OpenGL skills are very low, but maybe this is simple to fix.

— Reply to this email directly or view it on GitHub.

hduerr commented 10 years ago

Status of this issue:

  1. There is consensus that this is a bug and should be fixed.
  2. The problem is in the radar plugin, so this should be fixed by us.
  3. Guy has offered to look at the code in order to propose and/or implement a solution.
  4. Personally, I consider this a fairly serious issue because as it is, close to the boat there is hardly any transparency and this results in important chart information, like navaids, to be obscured by the radar image. Using the transparency slider to achieve sufficient transparency close to the boat results in nearly vanishing radar image farther away (this is exacerbated by the poorly adjusted transparency slider).
cowelld commented 10 years ago

The transparency issue may not be due to our process but rather the nature of the raw signal from the radar. Remote objects will have a fainter return than local ones. Simrad has features I haven't explored yet called STC and Target Boost. There's also the Threshold. Calling it a BUG is not kind to the program since it isn't something wrong but just not equivalent to the commercial units. They don't have signal spectrums yet is anyone protesting to Navico? I originally didn't have Transparency but Kees added it for the same reasons. I'll be down at the boat all this next week and between varnishings will try to get some useful information via Wireshark and the NSS. We're having a rain event today and so that's something to try for. I may make an alternate to the spectrum analysis which currently takes the entire sweep buffer for the sample. A secondary analysis would be to take the samples based on range cohorts. I'll look to dump the buffer into a file and use spreadsheet and standard statistical analysis to see if there's any patterns.

Hasta, Dave

----- Original Message ----- From: "hduerr" notifications@github.com To: "canboat/BR24radar_pi" BR24radar_pi@noreply.github.com Sent: Friday, April 25, 2014 5:36 AM Subject: Re: [BR24radar_pi] Transparency of radar image not consistent across entire image (#15)

Status of this issue:

  1. There is consensus that this is a bug and should be fixed.
  2. The problem is in the radar plugin, so this should be fixed by us.
  3. Guy has offered to look at the code in order to propose and/or implement a solution.
  4. Personally, I consider this a fairly serious issue because as it is, close to the boat there is hardly any transparency and this results in important chart information, like navaids, to be obscured by the radar image. Using the transparency slider to achieve sufficient transparency close to the boat results in nearly vanishing radar image farther away (this is exacerbated by the poorly adjusted transparency slider).

Reply to this email directly or view it on GitHub: https://github.com/canboat/BR24radar_pi/issues/15#issuecomment-41387476

hduerr commented 10 years ago

Re Dave's comment: I think the screenshots below show pretty good that the transparency is gradually increasing from the center of the image (the boat). A pattern looking like world-magnetic-model lines is showing through towards the edge while the center of the image is solid red - even so maximum transparency is selected. On the NSS, all of the radar returns are solid red with no breaking-up or weakness towards the edge. Based on this, I don't agree with the diagnosis that the issue is in the image generated by the radar. 20140425_transparency_1 20140425_transparency_2

guymadison commented 10 years ago

Are there any live captures of this data we can use to test against? Can they be looped?

Thanks

Guy

On Apr 25, 2014, at 1:28 PM, hduerr notifications@github.com wrote:

Re Dave's comment: I think the screenshots below show pretty good that the transparency is gradually increasing from the center of the image (the boat). A pattern looking like world-magnetic-model lines is showing through towards the edge while the center of the image is solid red - even so maximum transparency is selected. On the NSS, all of the radar returns are solid red with no breaking-up or weakness towards the edge. Based on this, I don't agree with the diagnosis that the issue is in the image generated by the radar.

— Reply to this email directly or view it on GitHub.

hduerr commented 10 years ago

I am available (on board) to help in any way such as capturing packets with Wireshark. It's installed but I used it only once a year ago so may need some instructions or we may have to do some trial and error. I have cloud storage to put it on. Also, remote control of my PC (Win 7) should be possible. My internet connection at the moment is scored off a dock bar and small restaurant where we had a beer last night, got the WiFi code and connected to it from the boat 1/4 mile away with our Rogue Wave (based on Ubiquity bullet). The connection seems to be quite OK. There is another paid option from the marina which I could try in case of problems. The router is a TP-Link TL-MR3220. I am on UTC + 1 time (DST) here in Tazacorte, La Palma, Canaries, Spain. While on board I check my email regularly but when away we don't get push mail. If needed, I can give you a mobile number to text to. Regarding data transfer volume, it might make the most sense to remote control my PC and capture and analyze the data here (just my thought). At the moment, my computer is not set up to compile OCPN. If needed, that could be fixed.

keesverruijt commented 10 years ago

Dave Cowell should be able to provide you with these. He uses them all the time.

On 28 Apr 2014, at 04:15, guymadison notifications@github.com wrote:

Are there any live captures of this data we can use to test against? Can they be looped?

Thanks

Guy

On Apr 25, 2014, at 1:28 PM, hduerr notifications@github.com wrote:

Re Dave's comment: I think the screenshots below show pretty good that the transparency is gradually increasing from the center of the image (the boat). A pattern looking like world-magnetic-model lines is showing through towards the edge while the center of the image is solid red - even so maximum transparency is selected. On the NSS, all of the radar returns are solid red with no breaking-up or weakness towards the edge. Based on this, I don't agree with the diagnosis that the issue is in the image generated by the radar.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

keesverruijt commented 10 years ago

I just checked, the "inconsistency" goes away when you decrease the transparency. Thus I think it has something to do with how we compute 𝛼.

Alpha is computed per blob (returned pixel) as:

alpha = strength * (MAX_OVERLAY_TRANSPARENCY - settings.overlay_transparency) / MAX_OVERLAY_TRANSPARENCY;

which is plain wrong: alpha should not depend on the strength of the radar return. I fixed this just now, but it does not give any improvement in the sense that the distance from center should not matter to transparency.

keesverruijt commented 10 years ago

Here's the new code:

https://github.com/canboat/BR24radar_pi/commit/9a8df86f8b9847ee187c7f00ed9b669f36d8f494

Maybe it has something to do with the fact that we draw 'small' triangles close to the boat and 'large' triangles further from the boat: as the distance grows, the 'blob_width' increases.

Maybe @guymadison knows?