opendlv
opendlv copied to clipboard
Fixing BPP from 24 to 3 to fix segfault in proxy-camera/memcpy
The configuration file needs to be adjusted by replacing 24 (assumed bits) with 3 (bytes representing the bytes per pixel):
- https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L47
- https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L60
- https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L73
- https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/config/configuration#L86
Adjust detectvehicle by removing /8:
- https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/code/system/application/perception/src/detectvehicle/detectvehicle.cpp#L97
Activate mySharedImg.getBytesPerPixel():
- https://github.com/chalmers-revere/opendlv/blob/experiment.idiada/code/system/application/perception/src/detectlane/detectlane.cpp#L89
Doesn't 'bpp' really translate to "bits per pixel"?
Is this solved?
At least it's very old :) I do not remember the details, but things are working now so perhaps close?
As far as I know, it's working but slight confusing if the bpp stands for bytes per pixel or bits per pixel.
It should be "bits per pixel", I think it might be dangerous to mix this up. Bytes per pixel seems to be a quite odd format, we could perhaps write that as "bytesPerPixel" just to be clear. Perhaps we should also have "bpp" in the config, and then divide by 8 in the code.
Actually by looking at https://github.com/chalmers-revere/opendlv.core/blob/master/code/core/system/proxy-camera-axis/src/Camera.cpp#L50 , it seems to be bytes per pixel... :) I hope we didn't mix this up hard...
To use "setBytesPerPixel" is fine, but we should not use "BPP" since that could be confusing.
@chrberger Should we do anything with this, or close it?