There are two types of window operations in Halcon:
1. dev_open_window opens the entity’s form and displays the image
2. open_window opens a virtual form, which is actually an image into the cache
-
* See the official routine advanced_visualization_settings.hdev
-
dev_close_window()
-
dev_open_window ( 0, 0, 512, 512, ‘black’, WindowHandle)
-
set_window_param (WindowHandle, ‘graphics_stack’, ‘true’) //default value: ‘false’
-
set_window_param(WindowHandle, ‘flush’, ‘false’) //default value: ‘true’
In my C++ project, I encountered this problem. When the SetWindowParam function is executed, an exception is always reported:
HALCON error #5190: Invalid window parameter
The solution is as follows:
The SetWindowParam function needs to rely on the dynamic library file hcanvas.dll, and copy the library from
C:\Program Files\MVTec\HALCON-xxx\bin\x64-win64
to your own project path.