Read binary images or HALCON regions.
The operator ::read_region reads regions from a binary file. The data is stored in packed form.
Tiff: Binary Tiff images with extension 'tiff' or 'tif'. The result is always one region. The color black is used as foreground. BMP: Binary Windows bitmap images with extension 'bmp'. The result is always one region. The color black is used as foreground. HALCONregions: File format of HALCON for regions. Several images can be stored (in one file) or read simultaneously via the operators ::write_region and ::read_region. All region files have the extension '.reg', which is not indicated when reading or writing the file. A search path ('image_dir') can be defined analogous to the operator ::read_image.
|
Region (output_object) |
region(-array) -> Hobject * : HRegion(Array) |
|
FileName (input_control) |
filename -> HTuple.char * |
/* Reading of regions and giving them gray values. */ read_image(&Img,"bild_test5") ; read_region(&Regs,"reg_test5") ; reduce_domain(Img,Regs,&Res) ;
If the parameter values are correct the operator ::read_region returns the value H_MSG_TRUE. If the file cannot be opened H_MSG_FAIL is returned. Otherwise an exception handling is raised.
::reduce_domain, ::disp_region
Image / region / XLD management