설치 및 교정_카메라 조명 - Helsparrow/OpenpnpDocs_KR GitHub Wiki

OpenPnP의 액추에이터 시스템을 사용하여 카메라 캡처 이벤트에 대한 응답으로 조명을 켜고 끌 수 있습니다.

조명 엑추에이터 설치

  1. 제어하려는 조명에 대한 액추에이터를 추가합니다. Machine Setup 탭으로 이동한 다음 조명을 할당할 카메라를 찾습니다. 머신(상향 카메라) 또는 헤드(아하향 카메라)에 연결되어 있음을 알 수 있습니다. Cameras 분기 옆에 있는 Actuators 분기로 이동한 다음 녹색 + 버튼을 클릭하여 새 Actuator를 추가합니다.
  2. 액추에이터 목록을 확장하고 새 액추에이터를 선택합니다.
  3. 액추에이터 페이지에 설명된 대로 액추에이터를 설정합니다. 다중 채널 조명이 있는 경우 액추에이터 프로필에 대해 읽어보십시오.

조명 테스트

Main Window -> Machine Controls -> Actuators로 이동하여 생성된 Actuator의 이름을 딴 버튼을 클릭합니다. 조명이 켜져야 합니다. 다시 클릭하면 꺼집니다. 이것이 작동하지 않으면 작동할 때까지 설정을 조정하거나 도움을 요청하십시오.

카메라에 조명 액추에이터 할당

이제 생성된 조명 액추에이터를 카메라에 할당할 수 있습니다:

Camera Light Actuator

다양한 ON / OFF 작동 옵션이 있습니다:

  • Before Capture ON: 컴퓨터 비전이 카메라 이미지를 캡처하기 전에 라이트 액추에이터를 작동합니다. 이것은 카메라 고정 전에 발생합니다. 파이프라인 내 특정 조명 작동 값 및 프로필을 제어하려면 [ImageCapture 스테이지](#ImageCapture Stage에서 활용) 섹션을 참조하십시오. 참고: 이 옵션은 거의 항상 활성화되어 있어야 합니다.

  • After Capture OFF: 컴퓨터 비전이 카메라 이미지를 캡처한 후 라이트 액추에이터를 끕니다.

  • User Camera Action ON: 사용자 작업이 의도적으로 카메라를 배치하거나 다른 방식으로 사용할 때 라이트 액추에이터를 켭니다

  • Anti-Glare OFF: 이 카메라 조명이 다른 카메라를 뒤덮지 않도록 막기 위해, 다른 카메라가 이미지를 캡처 하기 전에 꺼집니다. 서로 반대 방향(상단/하단)을 보는 카메라 끼리만 유효합니다.(Looking 필드 참조)

Light Actuator가 할당되는 즉시, 카메라 뷰의 우측 상단에 새 오버레이 조명 기호가 표시됩니다. 카메라 조명 상태를 표시하고 클릭하여 조명을 켜거나 끌 수 있습니다:

CameraViewLightOnOff

ImageCapture Stage에서 활용

모든 컴퓨터 비전 파이프라인에는 일반적으로 카메라에서 이미지를 캡처하는 ImageCapture 단계가 포함되어 있습니다:

ImageCapture Stage

카메라에 Light Actuator가 할당되는 즉시 ImageCapture 단계에서 조명을 제어할 수 있습니다.

defaultLight 속성이 활성화 된 경우(기본값), 액추에이터의 *DefaultON 값이 조명 밝기를 결정하는 데 사용됩니다. 전원이 꺼지면 light 속성이 작동합니다.

light 속성은 이 특정 파이프라인에 대한 조명을 제어합니다(defaultLight이 꺼져 있는 경우). 사용자 인터페이스는 액추에이터의 값 유형에 응답합니다. 즉, ON/OFF만 전환할 수 있는 조명에 대한 확인란일 수도 있고, 강도를 제어할 수 있는 조명에 대한 번호일 수도 있고, 다중 채널 조명을 제어하는 프로필 액추에이터 콤보 상자일 수도 있습니다:

Light Property Boolean

Light Property Double

Light Property Profile

조명 제어 스크립트 추가

OpenPnP에서 직접 액추에이터를 제어하는 대신 스크립트를 사용할 수 있습니다. 이것은 이전 버전의 OpenPnP에서는 유일한 수단이었기 때문에 이 문서는 대부분 이전 버전을 지원하기 위해 보관됩니다.


Not recommended for new machines!


The following is for (legacy) OpenPnP 2.0 version only, for versions 1.0 see further below.

For newer versions of OpenPnP 2.0, you must use the Camera.BeforeSettle/Camera.AfterSettle scripts, instead of the Capture ones. See also Scripting#CameraBeforeSettle, Scripting#CameraAfterSettle and the page about Camera Settling.

  1. Download the zipfile containing the scripts
  2. Expand the zipfile. There should be two scripts inside.
  3. Go to Main Menu -> Scripts -> Open Scripts Directory.
  4. In the folder that opens, open the Events directory.
  5. Copy the two scripts into the Events directory.

Now, whenever OpenPnP needs to capture an image from your Up looking camera it will run the Camera.BeforeSettle.js script, settle the camera and capture an image and then run the Camera.AfterSettle.js script. The first one will turn the lights on and the second will turn the lights off.

You can customize the way this works by modifying the scripts or the Gcode that controls the lights.

If you want to control the Down camera lights, just add another Actuator called DownCamLights. The script is already set up to use it.

The following is for OpenPnP 1.0 only:

  1. Download the zipfile containing the scripts to your desktop or somewhere else you can easily find it.
  2. Expand the zipfile. There should be two scripts inside.
  3. Go to Main Menu -> Scripts -> Open Scripts Directory.
  4. In the folder that opens, open the Events directory.
  5. Copy the two scripts into the Events directory.

Now, whenever OpenPnP needs to capture an image from your Up looking camera it will run the Camera.BeforeCapture.js script, capture an image and then run the Camera.AfterCapture.js script. The first one will turn the lights on and the second will turn the lights off.

You can customize the way this works by modifying the scripts or the Gcode that controls the lights.

If you want to control the Down camera lights, just add another Actuator called DownCamLights. The script is already set up to use it.

Here is a short video showing the steps above: https://www.youtube.com/watch?v=Y4DbYY9a9BQ

Previous Step Jump To Next Step
Vacuum Sensing Table of Contents Computer Vision