Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger source 设定为 0(line0)不生效 #7

Open
KoU2N opened this issue Dec 11, 2024 · 1 comment
Open

trigger source 设定为 0(line0)不生效 #7

KoU2N opened this issue Dec 11, 2024 · 1 comment

Comments

@KoU2N
Copy link

KoU2N commented Dec 11, 2024

您好,请问如何设定硬触发,设定无法生效,触发断言函数。有什么好的设定方法吗?


    def __enter__(self) -> "HikCamera":
        """
        Camera initialization : open, setup, and start grabbing frames from the device.
        """

        # Open the camera with MVS SDK with exclusive access
        assert not self.MV_CC_OpenDevice(hik.MV_ACCESS_Exclusive, 0)

        # Initialize the camera with a fixes set of settings
        # TODO rember setting
        self.setitem("TriggerMode", hik.MV_TRIGGER_MODE_ON)
        self.setitem("TriggerSource", hik.MV_TRIGGER_SOURCE_SOFTWARE)#这里把hik.MV_TRIGGER_SOURCE_SOFTWAR设定为0无法生效。
        self.setitem("AcquisitionFrameRateEnable", False)
        self.setting()

        # Set the camera settings to the user-defined settings
        if self.setting_items is not None:
            if isinstance(self.setting_items, dict):
                self.setting_items = self.setting_items.values()
            for key, value in self.setting_items:
                self.setitem(key, value)

@DIYer22
Copy link
Owner

DIYer22 commented Dec 11, 2024

我已经离开工业领域了,无法提供更多的帮助,抱歉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants