Divide two images.
The operator ::div_image divides two images. The gray values (g1,g2) of the input images (Image1) are transformed as follows: g' := g1 / g2 * Mult + Add If an overflow or an underflow occurs the values are clipped.
Several images can be processed in one call. In this case both input parameters contain the same number of images which are then processed in pairs. An output image is generated for every pair.
|
Image1 (input_object) |
(multichannel-)image(-array) -> Hobject: HImage(Array) ( byte / int1 / int2 / int4 / real / complex ) |
| Image(s) 1. | |
|
Image2 (input_object) |
(multichannel-)image(-array) -> Hobject: HImage(Array) ( byte / int1 / int2 / int4 / real / complex ) |
| Image(s) 2. | |
|
ImageResult (output_object) |
(multichannel-)image(-array) -> Hobject * : HImage(Array) ( byte / int1 / int2 / int4 / real / complex ) |
| Result image(s) by the division. | |
|
Mult (input_control) |
number -> HTuple.double / long |
| Factor for gray range adaption. | |
| Default value: 255 | |
| Suggested values: 0.1, 0.2, 0.5, 1.0, 2.0, 3.0, 10, 100, 500, 1000 | |
| Typical range of values: -1000 <= Mult <= 1000 | |
| Minimum increment: 0.001 | |
|
Recommended increment: 1 | |
|
Add (input_control) |
number -> HTuple.double / long |
| Value for gray range adaption. | |
| Default value: 0 | |
| Suggested values: 0.0, 128.0, 256.0, 1025 | |
| Typical range of values: -1000 <= Add <= 1000 | |
| Minimum increment: 0.01 | |
|
Recommended increment: 1.0 | |
read_image(&Image0,"fabrik"); disp_image(Image0,WindowHandle); read_image(&Image1,"Affe"); disp_image(Image1,WindowHandle); div_image(Image0,Image1,&Result,2.0,10.0); disp_image(Result,WindowHandle);
The operator ::div_image returns the value H_MSG_TRUE if the parameters are correct. The behavior in case of empty input (no input images available) is set via the operator ::set_system('no_object_result',<Result>) If necessary an exception handling is raised.
::add_image, ::sub_image, ::mult_image
::add_image, ::sub_image, ::mult_image
Image filters