# Tag Info

6

Without replicating the bits the LSBs will be 0, so for the maximum value of 0x1f (max for 5 bits) it would expand to 0xf8 when converted to 8 bit. What you want is 0xff so the range of 0x00->0x1f will be mapped to 0x00->0xff instead of 0x00->0xf8. Without merging the LSB you would not be able to convert 0x1f,0x1f,0x1f to white (0xff,0xff,0xff). Incidentally ...

6

There's actually a reasonably good mathematical reason for doing bit replication: First note that the n-bit string, $N$, actually represents the value $\frac{N}{2^n-1}$ and we want to produce the m-bit string, $M$, where $n<m$ and $$\frac{N}{2^n-1}\approx\frac{M}{2^m-1}$$ We first scale numerator and denominator with \frac{N.(2^n+1)}{(2^n-1)(2^n+1)}\...

6

Problem is that people do not really agree on a 1:1 mapping of color names. But yes such tools exists, this is a simple nearest neighborhood test. You could use any spatial query module to do this. Here is a simple (naive) python example: from __future__ import print_function import webcolors from scipy.spatial import KDTree # lets populate some names ...

5

The mathematical approach to this is to represent the other colors/light sources in terms of your standard primaries in the color space. Represent your target color and available light sources as vectors with, say, the RGB color space as the basis. Figuring out how to display your target color using your available sources then becomes a change of basis, a ...

3

I may be misunderstanding what you're asking, but if you know the sensor size and the number of pixels in the object, then you can calculate the object size. For example, a Canon 7D has an APS-C sensor that's 22.3 x 14.9mm and 5184 x 3456 pixels. That works out to ~0.0043mm/pixel. So if you have an object that's 250 pixels wide, then the projection of the ...

3

Yes, theoretically, for the sphere no for other things in image. If it is possible to augment the situation then it is possible to measure anything you can track much more reliably. First, knowing the scale of a object that you can successfully track is a requirement to getting a scale for the image as the cameras lost all scaling info. But this requirement ...

2

Rounding is all about what happens to the data in the higher precision format that don't exist in the lower precision one. For example, 0.7 cannot exactly be represented as an 8-bit unsigned, normalized integer, as 0.7 * 255 = 178.5. Which gets stored: 178 or 179? The same goes for any other precision. 16-bit floats can't store as many digits as a 32-bit ...

1

Perhaps Assimp will work for you? In particular, it has a command line tool for converting between formats.

1

Blender appears to have a .X importer. It's a plugin that ships with Blender, but is disabled by default, so you have to enable it in User Preferences. See: https://blender.stackexchange.com/a/8749/18161 Blender also has a glTF exporter. For now that's a separate download, from here: glTF-Blender-Exporter

Only top voted, non community-wiki answers of a minimum length are eligible