Jürgen Riegel July 2006
Miba is a way to embed information about the 3D space into a 2D image. This makes it often possible to use the 2D picture instead of a 3D viewer. By the Miba information you're able to calculate the position of a 3D location in the 2D image. That allows you to decorate the image later with arbitrary 3D information. You can take the picture in a early state (design) and use it later (e.g. Production). You do not need to know the kind of 3D data or the positions when you take the picture. So the picture is completely separated from the 3D data.
The 3D information is included in the image by an xml text embedded in the comment section of a PNG or JPEG format. The XML is defined by the Miba2.xsd . This holds mainly a 4x4 matrix which makes it possible to calculate the 2D position of an arbitrary 3D point by using this two formulas:
In
which is M the Matrix out of the Image, b the with and
h the hight of the image. (Px,Py,Pz) is the 3D point
and Sx,Sy the resulting 2D position in the image.
MIBA is currently used by e.g.
QDAFixturePlot (Reporting of dimensional data)
QDARDS (RohbauDatenbankSystem der Daimler AG)
ZeissPiWeb.
The Schema definition of the MIBA XML format: Miba2.xsd
An Miba example XML file (normally this XML is embedded in the picture): Miba2Example.xml
This are a number of examples pictures with embedded MIBA. They are taken from different angles and different projections. The box is located with a corner in 0,0,0 and exactly 100 by 100 by 100 large.
Name 
Description 
Example calculation 
No. 

Box in Front view with an orthographic projection. 
(1) 

Box in Axometric view with an orthographic projection. 
(2) 

Box in Front view with an perspective projection. 
(3) 
Extensive examplesThis set of examples covers a large range of aspect ratios, sizes, camera types and image types. There for we use a Test part called Blade. Its available as STEP, IGES or STL. The test part has well defined dimensions and allows the reproduction and testing of the 3D to 2D calculations. On the right hand you see an picture where some edges and Axes are annotated with its 3D coordinates. The examples got automated generated by FreeCAD with a script. For some of the examples we have also example calculations:


If you want to use Miba information in a image you have to be able to read the comment section of the image. For JPEG and PNG exist standards. Often the tool kits you use to open the image can deliver the comment to, like e.g. QT the QImage class.
One approach is to use rdjpgcom.exe or/and its source code to obtain the image comment.
A Open Source reference implementation you'll find in the FreeCAD
project:
FreeCAD
The Save Picture function can embed MIBA information into the pictures:
This Script shows e.g. the automated creation of a set of images from the test part:
import
Part,PartGui 
You can execute that script by simply dropping it in the
FreeCAD python console:
About Projections on Wikipedia: 3D Projection
About the 4x4 Matrix: 4x4 Matrix in OpenGL.
A discussion of the MIBA Math (German): MIBA math. . Interesting is foremost the formula 6 and 7. This formula are the calculation of an 3D point to 2D picture coordinates.
Thanks goes to Werner Mayer which did lot of the Math. Thomas Karthe, which participate in the XML definition and did a Catia Macro implementation. Michael Deck to review the Documentation.
Jürgen Riegel, Ulm 2006