Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image data pixel order specification #681

Closed
thomassedlmayer opened this issue Oct 26, 2022 · 2 comments
Closed

Image data pixel order specification #681

thomassedlmayer opened this issue Oct 26, 2022 · 2 comments
Labels
FeatureRequest Proposals which enhance the interface or add additional features.

Comments

@thomassedlmayer
Copy link
Contributor

Describe the feature

Currently, it is not possible to define the starting point of the first pixel row and column for camera image data (CameraSensorView>image_data) in the CameraSensorViewConfiguration. It could be top left or bottom right or any other combination but it can not be specified in OSI.

Proposed solution:

Add an enum to CameraSensorViewConfiguration, indicating starting point of pixel ordering (e.g., bottom-left, top-left) or processing/storage order (left-right-top-down, right-left-bottom-up, etc.)

Other considered options with disadvantages:

  • Fixed definition (e.g., only allow left to right, top down);
    Not backwards compatible because more restrictive (probably too restrictive in general)
  • Positive/negative pixel-height/width to represent a coordinate system where 0/0 is the origin and the signed dimension indicates the respective direction to follow when processing the image pixels (this is done similarly in Microsoft bitmaps for example);
    Negative values for the variable "number_of_pixels_horizontal" (which basically signifies the pixel width) may seem confusing because of the wording; would not be backwards compatible as well because of the rule "is_greater_than_or_equal_to: 1"

Describe the backwards compatibility

Breaking changes are not necessary with the proposed solution. So far you could not make any specifications or assumptions concerning pixel order, so this is just additional information, which is necessary to reliably interpret given image data.

@thomassedlmayer thomassedlmayer added the FeatureRequest Proposals which enhance the interface or add additional features. label Oct 26, 2022
@raue
Copy link

raue commented Oct 26, 2022

First thought was driven by the wish to be related to something real, i.e. do it like image sensors. By reading data sheets and asking camera experts it turns out, that there seems to be no standard. Some of those semiconductors have even configuration options for selecting different kinds of readout orders.
Second thought was heading in the direction of image formats. BMP (s. https://docs.fileformat.com/image/bmp/) for instance starts from bottom left. Others seem to differ from that (s. https://stackoverflow.com/questions/24223299/what-is-the-ordering-of-pixel-rows-for-common-image-formats).

Therefore, we cannot define a standard in OSI, since pixel-order can come in any possible way. Giving the opportunity to select/define any possible pixel-order in CameraSensorViewConfiguration would be preferable.

@thomassedlmayer
Copy link
Contributor Author

Resolved by #698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Proposals which enhance the interface or add additional features.
Projects
None yet
Development

No branches or pull requests

2 participants