-
Notifications
You must be signed in to change notification settings - Fork 1
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
Data Types, Style, Units #14
Comments
@revisionfx See proposed serialization in camdkit at https://smpte.github.io/ris-osvp-metadata-camdkit/ |
It's what I am reading... and only questioning why put everything in a 32b int basis when it's not intrinsically the data type? . I am suggesting supporting type: "float" and defining range in variable natural range, not with X100 to fit in an int form. I never use JSON internally because of poor typing so I am not a good reference on that, but if you create a format, I am thinking maybe a good idea to support both and if int explicitly set a scaling factor in variable schema property so it's easier to parse for an app unambiguously. e.g.: Focal Length even if in mm can have additional precision than integer mm (e.g. 27.53mm) particularly with zoom lenses. Why burn-in legacy imprecision (I understand this to be an issue with EXIF) ? On wide angle lenses 0.5 mm is a lot off. If not precise enough the camera tracker will try to solve additional precision. Won't be in int mm. It's not very nice also to build a C type API over that. See below for example, BTW: I asked Sen at Cooke to retrieve the bitbucket TonyD did back then using YAML for format examples/documentation. He said it will be available soon again. |
Fixed point representation is used to since floats cannot achieve reliable interop across platforms/OS/languages. I do not expect end users to tweak these files by hand. Do you? We could recommend a way to present the information to the end user if you think it would help.
Focal length is expressed in whole mm since it is the nominal focal length (i.e. the one printed on the side of the lens) and not the actual focal length. Do you know of any nominal focal lengths that use fractional mm? The current fixed point representations can be modified to achieve higher precisions. |
It's not about user typing stuff directly, it's mapping this to other applications, API.
If you consider storage in fixed point format most robust, I was suggesting adding an explicit per variable scaler (e.g.: 100X) and a precision hint for presentation (e.g. 0.01). I use the word hint as based on educated maximum expected precision in best case scenario also. I would also only use two units basis, mm for within camera-lens pairing (as sensor dimension and lens focal length starts in that space so is most user friendly) and meters for 3D scene inclusion (focal distance and camera position if a camera path is added as a block by someone). I would also define range in natural space (e.g. 0-360) as it's a description not the actual variable name-value.
Any zoom lens no where the knob is set between two markings?
|
Adding this as reference for thinking: Already discussed over there that horizontal and vertical aperture (what is called physical dimensions here) should be in mm basis... #usda 1.0 |
leaving values aside as you are defining your own format for interchange (not to generate a camera report) You could do something like below conceptually - as this would allow you to 1) remove some dependency on rational numbers and 2) have support for legacy formats or hardware that don't have FP unit and variation on that theme and 3) allow your dictionary to be "translated" to other languages where fixed_point arithmetic and rational numbers are not natural or natively supported and this so the data model can be carried over within other domains properly. "horizontal_offset": { "type": "fixed_float_32", "normalizing_factor": 1000, "minimum": -65535.0, "maximum": 65535.0, "precision": 0.001, "unit":"pixels","animation": "dynamic", "value":[...] values here are scaled by normalizing factor for write and on import divided by it would be usual use case. or even better, split that in two or 3 (definition, description hints and value(s) that TBD when not static) |
Is it a good idea to treat as integer what is not?
Perhaps you should have an additional column "Precision", e.g. 0.001, separate from Unit
e.g.: Anamorphic_Squeeze: Scale, 0.01, Number*
The unit like thing here is it's a scale factor, 1D scaler.
0.01 is the Precision hint is also usable for UI display (meta-data parametrization) and for fileOut (min decimal values).
I understand some old cameras don't have FPU and some legacy SMPTE document used such workarounds but it's 2023.
Maybe for each parameter block add a StorageType so if INT32 below vs FLT32 next example
e.g.: (conceptually)
"shutter_angle", needed, static, "Description", Scale, 0.01, 0, 360.0
camera_parameter_block {
"NumberStorageType": INT32 // static number values have two terms, second one is dividing factor
}
camera_parameter_block {
}
The text was updated successfully, but these errors were encountered: