KR100323809B1 - Method and apparatus for controlling pan/tilt camera - Google Patents

Method and apparatus for controlling pan/tilt camera Download PDF

Info

Publication number
KR100323809B1
KR100323809B1 KR1019990022940A KR19990022940A KR100323809B1 KR 100323809 B1 KR100323809 B1 KR 100323809B1 KR 1019990022940 A KR1019990022940 A KR 1019990022940A KR 19990022940 A KR19990022940 A KR 19990022940A KR 100323809 B1 KR100323809 B1 KR 100323809B1
Authority
KR
South Korea
Prior art keywords
motor
camera
tilt
rotation
driving
Prior art date
Application number
KR1019990022940A
Other languages
Korean (ko)
Other versions
KR20010002888A (en
Inventor
김운용
Original Assignee
김운용
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 김운용 filed Critical 김운용
Priority to KR1019990022940A priority Critical patent/KR100323809B1/en
Priority to TW089109308A priority patent/TW425487B/en
Priority to GB0012824A priority patent/GB2351162B/en
Priority to JP2000161241A priority patent/JP2001036798A/en
Priority to DE10029868A priority patent/DE10029868A1/en
Priority to CN 00109274 priority patent/CN1278074A/en
Publication of KR20010002888A publication Critical patent/KR20010002888A/en
Application granted granted Critical
Publication of KR100323809B1 publication Critical patent/KR100323809B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/66Remote control of cameras or camera parts, e.g. by remote control devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

본 발명은 팬/틸트 카메라 제어방법 및 그 장치에 관한 것으로서, 뷰 파인더 화면의 어느 위치에 표적이 잡혀 있든지 그 위치에 관계없이 그 표적의 중심위치를 지정하여 최단거리로 직접 방향 전환하여, 뷰 파인더 화면의 중앙부분에 표적의 중심이 나타나게 카메라를 제어하기 위한 것이다.The present invention relates to a method for controlling a pan / tilt camera and a device thereof, regardless of which position the target is positioned on the viewfinder screen, by directly designating the center position of the target and redirecting the view to the shortest distance. This is to control the camera so that the center of the target appears in the center of the finder screen.

이를 위하여 본 발명은 자신만이 갖는 고유의 카메라 식별코드를 기억한 상태에서, 외부에서 전달되는 자신에 대한 직접 방향전환명령을 수신하여, 직접 방향전환명령이 수신되면, 현재 카메라의 화면 중심위치와 카메라에 포착되는 표적의 중심위치를 이용하여, 카메라가 이동해야 할 회전방향과 이동량을 산출하고, 일정한 주기의 타이머 인터럽트에 의해 상기 팬모터 및 틸트모터를 구동시켜, 기설정된 회전속도 및 상기 계산된 회전방향과 이동량을 기준으로 상기 카메라를 이동시킨다.To this end, the present invention receives a direct redirection command for itself transmitted from the outside in a state in which a unique camera identification code is stored in itself, and when a direct redirection command is received, Using the center position of the target captured by the camera, the rotation direction and amount of movement to be moved by the camera are calculated, and the fan motor and the tilt motor are driven by a timer interrupt of a predetermined period, so that the predetermined rotation speed and the calculated The camera is moved based on the rotation direction and the movement amount.

따라서, 본 발명은 카메라에 포착되는 표적을 추적하기 위한 소프트웨어의 처리속도 및 카메라 회전속도를 향상시킬 수 있게 된다.Therefore, the present invention can improve the processing speed and the camera rotation speed of the software for tracking the target captured by the camera.

Description

팬/틸트 카메라 제어방법 및 그 장치{Method and apparatus for controlling pan/tilt camera}Method for controlling pan / tilt camera and its apparatus {Method and apparatus for controlling pan / tilt camera}

본 발명은 팬/틸트 카메라 제어방법 및 그 장치에 관한 것으로서, 특히 일정한 간격으로 화면을 가상 분할하여 세분화시키고, 그 분할된 화면상의 좌표로 표적 위치를 검출하여 카메라를 직접 이동시킴으로써, 카메라에 포착되는 표적을 추적하기 위한 소프트웨어의 처리속도 및 카메라 회전속도를 향상시킬 수 있는 팬/틸트 카메라 제어방법 및 장치에 관한 것이다.The present invention relates to a method for controlling a pan / tilt camera and a device thereof, and more particularly, to virtually segment a screen at regular intervals, to segment the screen, and to detect a target position with the coordinates on the divided screen to move the camera directly. The present invention relates to a pan / tilt camera control method and apparatus for improving the processing speed of the software for tracking a target and the rotation speed of the camera.

종래의 팬/틸트 카메라는 x축 구동 및 y축 구동 각각을 위한 2개 이상의 모터에 의해 좌우로, 또는 상하로 이동되도록 구현되어 있다. 이러한 카메라의 방향전환에 사용되는 제어장치는, 카메라를 통해 촬영되는 뷰 파인더 화면상의 표적을 보면서, 유선 또는 무선 리모트 콘트롤러를 사용하여, 상기 2개 이상의 모터를 각각 제어하여, 표적을 따라 카메라를 좌우 방향으로 회전시키거나, 또는 상하방향으로 회전시켜 화면상의 표적을 중심으로 끌어들이는 주사(scan) 및 검출 방식을 사용하고 있다.Conventional pan / tilt cameras are implemented to be moved left and right, or up and down by two or more motors for the x-axis drive and the y-axis drive, respectively. The controller used to change the direction of the camera controls the two or more motors, respectively, by using a wired or wireless remote controller while looking at a target on the viewfinder screen photographed through the camera, and controls the camera along the target. Scan and detection methods that rotate in a direction or rotate in a vertical direction to draw a target on a screen.

그러나 이러한 종래의 팬/틸트 카메라 제어장치는 x축 구동모터 및 y축 구동모터를 각각의 제어키를 사용하여 개별적으로 제어하여야 하므로 카메라의 방향 전환에 소요되는 시간이 길어지게 되는 단점이 있었으며, 이것을 자동으로 제어하기 위하여 영상 인식에 의해 표적을 추적하고 소프트웨어로 처리하는 경우, 그 소프트웨어 처리속도가 늦어지게 되는 단점이 있었다.However, such a conventional pan / tilt camera controller has a disadvantage in that it takes longer to change the direction of the camera because the x-axis drive motor and the y-axis drive motor must be individually controlled using respective control keys. In the case of tracking the target by image recognition and processing by software for automatic control, the software processing speed is slowed.

따라서 본 발명은 상기의 문제점을 해결하기 위하여 안출한 것으로서, 본 발명은 뷰 파인더 화면의 어느 위치에 표적이 잡혀 있든지 그 위치에 관계없이 그 표적의 중심위치를 지정하여 직접 방향전환을 지시하고, 카메라 제어장치가 상기 지정된 중심위치로 x축 구동(수평)모터 및 y축 구동(수직)모터를 최단거리로 구동 및 자동 회전시켜 뷰 파인더 화면의 중앙부분에 표적의 중심이 나타나도록 카메라 회전을 제어하는 팬/틸트 카메라 제어방법 및 그 장치를 제공함에 목적이 있다.Therefore, the present invention has been made in order to solve the above problems, the present invention is directed to direct the direction change by specifying the center position of the target regardless of the position of the target at any position of the viewfinder screen, The camera controller controls the camera rotation so that the center of the target appears in the center of the viewfinder screen by automatically driving and rotating the x-axis drive (horizontal) motor and the y-axis drive (vertical) motor to the specified center position to the shortest distance. An object of the present invention is to provide a pan / tilt camera control method and an apparatus thereof.

상기의 목적을 달성하기 위하여 본 발명의 일 실시 예에서는, 수평 회전을 위한 팬(x축 구동)모터 및 그 구동회로와, 수직 회전을 위한 틸트(y축 구동)모터 및 그 구동회로를 구비하고, 상기 두 모터 각각에 감속수단을 통해 기계적으로 결합시킨 카메라를 상기 각각의 모터 및 구동회로에 의해 좌우 또는 상하방향으로 제어하는 방법에 있어서, 현재 카메라의 화면 중심위치와 카메라에 포착되는 표적의 중심위치를 이용하여, 카메라가 이동해야 할 회전방향과 이동량을 산출하는 이동량 산출과정과; 일정한 주기의 타이머 인터럽트에 의해 상기 팬모터 및 틸트모터를 구동시켜, 기설정된 회전속도 및 상기 계산된 회전방향과 이동량을 기준으로 상기 카메라를 이동시키는 모터 제어과정을 포함하는 것을 특징으로 하는 팬/틸트 카메라 제어방법을 제공한다.In order to achieve the above object, an embodiment of the present invention includes a fan (x-axis drive) motor for horizontal rotation and its driving circuit, and a tilt (y-axis drive) motor for vertical rotation and its driving circuit. In a method of controlling the camera mechanically coupled to each of the two motors through the deceleration means in the left and right or up and down directions by the respective motor and the driving circuit, the screen center position of the current camera and the center of the target captured by the camera A movement amount calculating step of calculating a rotation direction and a movement amount that the camera should move using the position; And a motor control process of driving the fan motor and the tilt motor by a timer interrupt of a predetermined period to move the camera based on a predetermined rotation speed and the calculated rotation direction and movement amount. Provides a camera control method.

상기의 목적을 달성하기 위하여 본 발명 방법의 다른 실시 예에서는, 수평 회전을 위한 팬모터 및 그 구동회로와, 수직 회전을 위한 틸트모터 및 그 구동회로를 구비하고, 상기 두 모터 각각에 감속수단을 통해 기계적으로 결합시킨 다수의 카메라를 각각 병렬로 연결하여, 상기 각각의 모터 및 구동회로에 의해 카메라를 좌우 또는 상하방향으로 제어하는 방법에 있어서, 외부에서 전달되는 자신에 대한 직접 방향전환명령을 수신 대기하는 과정과; 상기 직접 방향전환명령이 수신되면, 자신의 카메라에 대한 현재화면 중심위치와 표적의 중심위치를 이용하여, 카메라 회전방향과 이동량을 산출하는 이동량 산출과정과; 일정한 주기의 타이머 인터럽트에 의해 상기 팬모터 및 틸트모터를 구동시켜, 기설정된 회전속도 및 상기 계산된 회전방향과 이동량을 기준으로 상기 자신의 카메라를 이동시키는 모터 제어과정을 포함하는 것을 특징으로 하는 팬/틸트 카메라 제어방법을 제공한다.In another embodiment of the present invention, a fan motor and its driving circuit for horizontal rotation, a tilt motor and a driving circuit for vertical rotation are provided. In the method of controlling the cameras in the left and right or up and down directions by the respective motor and the driving circuit by connecting a plurality of cameras coupled in parallel to each other in parallel, receiving a direct direction change command for itself transmitted from the outside Waiting process; A movement amount calculating step of calculating a camera rotation direction and a movement amount by using a current screen center position and a target center position of the camera when the direct direction change command is received; And a motor control process of driving the fan motor and the tilt motor by a timer interrupt of a predetermined period to move the own camera based on a predetermined rotation speed and the calculated rotation direction and movement amount. / Tilt camera control method is provided.

상기의 목적을 달성하기 위하여 본 발명 장치의 일 실시예에서는, 수평 회전을 위한 팬모터 및 그 구동수단과, 수직 회전을 위한 틸트모터 및 그 구동수단을 구비하고, 상기 두 모터 각각에 감속수단을 통해 기계적으로 결합시킨 카메라를 상기 각각의 모터 및 구동수단에 의해 좌우 또는 상하방향으로 제어하는 장치에 있어서, 상기 팬모터 또는 틸트모터를 구동하기 위한 인터럽트를 미리 정해진 시간마다 일정한 주기로 발생시키는 타이머수단과; 상기 타이머수단에서 발생되는 매 인터럽트마다 모터 회전스텝수를 카운트하면서 모터 회전방향과 기설정된 회전속도에 따라 상기 팬모터 또는 틸트모터를 순차적으로 제어하는 일련의 모터 구동 프로그램을 내장한 프로그램 저장수단과; 자신이 제어하는 카메라의 고유 식별코드를 기억하였다가 외부에서 자신에게 주어지는 특정명령에 의해 현재 카메라의 화면 중심위치와 카메라에 포착되는 표적의 중심위치를 이용하여 카메라가 이동해야 할 회전방향과 이동량을 산출하고, 상기 타이머수단의 인터럽트에 의해 상기 롬에 저장되어 있는 모터 구동 프로그램을 실행시키는 주처리유닛과; 상기 주처리유닛이 팬모터 또는 틸트모터를 구동시킬때에 필요로 하는 데이터들을 저장하는 제 1데이터 저장수단과; 상기 주처리유닛이 상기 모터 구동 프로그램을 실행시킨 결과들 중에서, 팬모터 또는 틸트모터의 현재 위치에 관련된 데이터들을 저장하는 제 2데이터 저장수단과; 상기 주처리유닛이 외부와 통신할 수 있는 데이터 송수신포트 및 경로를 지원하는 데이터 송수신수단을 포함하는 것을 특징으로 하는 팬/틸트 카메라 제어장치를 제공한다.In order to achieve the above object, in one embodiment of the present invention, a fan motor and its driving means for horizontal rotation, a tilt motor and its driving means for vertical rotation, each of the two motors is provided with a deceleration means An apparatus for controlling a camera coupled mechanically through each of the motor and the driving means in the left and right or up and down directions, comprising: a timer means for generating an interrupt for driving the fan motor or the tilt motor at a predetermined period every predetermined time; ; Program storage means incorporating a series of motor drive programs for sequentially controlling the fan motor or the tilt motor in accordance with the motor rotation direction and a predetermined rotation speed while counting the number of motor rotation steps for each interrupt generated by the timer means; Remember the camera's unique identification code and control the rotation direction and the amount of movement the camera should move by using the current screen center position of the camera and the target position captured by the camera by a specific command given from the outside. A main processing unit for calculating and executing a motor driving program stored in the ROM by an interrupt of the timer means; First data storage means for storing data necessary for the main processing unit to drive a fan motor or a tilt motor; Second data storage means for storing data relating to a current position of a fan motor or a tilt motor, among results of the main processing unit executing the motor drive program; The main processing unit provides a pan / tilt camera control device comprising a data transmission / reception port and a data transmission / reception means for supporting a path for communicating with the outside.

도 1은 본 발명의 팬/틸트 카메라 제어장치에 대한 구성을 개략적으로 나타낸 블록도1 is a block diagram schematically showing the configuration of the pan / tilt camera control apparatus of the present invention

도 2는 임의 카메라에 표적이 검출될 때, 호스트 컴퓨터의 방향전환 판단유닛에서 카메라 이동명령을 발생시키기 위하여 수행하는 신호처리 흐름도Fig. 2 is a signal processing flow diagram performed to generate a camera movement command in a direction determination unit of a host computer when a target is detected by an arbitrary camera.

도 3은 본 발명의 팬/틸트 카메라 제어방법을 설명하기 위하여 도시한 도 1의 주처리유닛에서의 신호처리 흐름도FIG. 3 is a signal processing flowchart of the main processing unit of FIG. 1 shown to explain the method for controlling the pan / tilt camera of the present invention.

도 4는 도 3의 모터구동 서브루틴에 대한 신호처리 흐름도4 is a signal processing flowchart for the motor drive subroutine of FIG.

도 5는 본 발명에서 정의되는 모터구동펄스와 그 변수들을 설명하기 위한 파형 예도5 is an exemplary waveform diagram for explaining the motor driving pulse and its variables defined in the present invention;

도 6a 내지 도 6c는 본 발명에서 일정한 간격으로 세분화된 뷰 파인더 화면상의 주소지정 개념과 그를 이용한 직접 방향전환기능을 설명하기 위한 화면 표시 예도6A to 6C are screen display examples illustrating an addressing concept on a view finder screen segmented at regular intervals in the present invention and a direct redirection function using the same;

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

100 : 주처리 유닛 110 : 타이머 수단100: main processing unit 110: timer means

120 : 롬(ROM)120: ROM

130 : 데이터 송수신수단(UART & RS232)130: data transmission and reception means (UART & RS232)

140, 150 : 데이터 저장수단 160 : 팬구동부140, 150: data storage means 160: fan drive unit

161 : 팬모터 162 : 팬기어161: fan motor 162: fan gear

170 : 틸트구동부 171 : 틸트모터170: tilt drive unit 171: tilt motor

172 : 틸트기어 180 : 팬/틸트 카메라172: Tilt Gear 180: Pan / Tilt Camera

이하에서, 본 발명의 실시예를 첨부된 도면에 의거하여 상세히 설명하면 다음과 같다.Hereinafter, an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 팬/틸트 카메라 제어장치에 대한 전체적인 구성을 개략적으로 나타낸 블록도로서, 본 발명의 장치는 팬/틸트 카메라(180)와, 상기 카메라의 수평 회전을 위한 팬모터(161) 및 그 구동수단(160)과, 상기 카메라의 수직 회전을 위한 틸트모터(171) 및 그 구동수단(170)과, 상기 두 모터(161)(171) 각각에 기계적으로 팬/틸트 카메라(180)를 결합시키는 감속수단(162)(172)을 포함하여, 상기각각의 모터 및 구동수단 및 감속수단에 의해 상기 팬/틸트 카메라에 회전력을 제공할 수 있게 구성한다. 그리고 상기 팬모터 또는 틸트모터를 구동하기 위한 인터럽트를 미리 정해진 시간마다 일정한 주기로 발생시키는 타이머수단(110)과, 상기 타이머수단에서 발생되는 매 인터럽트마다 모터 회전스텝수를 카운트하면서 모터 회전방향과 기설정된 회전속도에 따라 상기 팬모터 또는 틸트모터를 순차적으로 제어하는 일련의 모터 구동 프로그램을 저장하는 프로그램 저장수단(ROM;120)과, 자신이 제어하는 카메라의 고유 식별코드를 기억하였다가 외부에서 자신에게 주어지는 특정명령에 의해 현재 카메라의 화면 중심위치와 카메라에 포착되는 표적의 중심위치를 이용하여 카메라가 이동해야 할 회전방향과 이동량을 산출하고, 상기 타이머수단의 인터럽트에 의해 상기 롬에 저장되어 있는 모터 구동 프로그램을 실행시키는 주처리유닛(MPU;100)과, 상기 주처리유닛이 팬모터 또는 틸트모터를 구동시킬때에 필요로 하는 데이터들을 저장하는 제 1데이터 저장수단(예를 들면 SRAM;140)과, 상기 주처리유닛이 필요로 하는 고유의 카메라 식별코드나 상기 모터 구동 프로그램을 실행시킨 결과들 중에서, 팬모터 또는 틸트모터의 현재 위치에 관련된 데이터들을 비휘발성 메모리에 저장하는 제 2데이터 저장수단(NVRAM;150)과, 상기 주처리유닛이 외부와 통신할 수 있는 데이터 송수신포트 및 경로를 지원하는 데이터 송수신수단(예를 들면, UART 또는 RS-232; 130)을 포함하여 구성한다.1 is a block diagram schematically showing the overall configuration of the pan / tilt camera control apparatus of the present invention, the apparatus of the present invention is a pan / tilt camera 180, the pan motor 161 for the horizontal rotation of the camera And a pan / tilt camera 180 mechanically connected to the driving means 160, the tilt motor 171 for vertical rotation of the camera, the driving means 170, and the two motors 161, 171. Including a deceleration means (162, 172) for coupling, it is configured to provide a rotational force to the pan / tilt camera by the respective motor and drive means and deceleration means. And timer means 110 for generating an interrupt for driving the fan motor or the tilt motor at predetermined intervals at predetermined time intervals, and counting motor rotation steps for every interrupt generated by the timer means. A program storage means (ROM; 120) for storing a series of motor driving programs for sequentially controlling the fan motor or the tilt motor according to the rotational speed, and a unique identification code of the camera controlled by the user, and then stored to the outside The motor which is stored in the ROM by the interrupt of the timer means is calculated by the given command to calculate the rotation direction and the amount of movement the camera should move using the screen center position of the current camera and the target center position captured by the camera. A main processing unit (MPU) 100 for executing a drive program; First data storage means (e.g., SRAM) 140 for storing data required when the unit drives a pan motor or a tilt motor, and a unique camera identification code or the motor required by the main processing unit; Among the results of executing the driving program, second data storage means (NVRAM) 150 for storing data related to the current position of the fan motor or the tilt motor in the nonvolatile memory, and the main processing unit can communicate with the outside. It comprises a data transmission and reception means (for example, UART or RS-232; 130) to support the data transmission and reception port and the path.

이때 상기 주처리유닛은, 상기 주처리 유닛은 독립적으로도 동작이 가능하며, 그 뿐만 아니라 상기 데이터 송수신수단(130)을 통해 외부의 호스트 컴퓨터(30)와의 연결이 가능하여, 이러한 호스트 컴퓨터에서 하달되는 명령에 의해그 동작이 제어될 수 있다. 이러한 경우에 상기 주처리 유닛(100)은 자신이 제어하는 카메라만의 고유한 식별코드를 기억하고 있어야 한다. 또 상기 주처리 유닛은 외부에서 하달되는 직접 방향전환명령을 수행하기 위하여, 상기 두 모터와 각각의 감속수단에 의해 결정되는 카메라의 미세회전각도를 기준으로 미리 설정된 팬모터의 회전범위와 틸트모터의 회전범위와, 상기 카메라의 미세회전각도에 일치하는 스텝 수로 가상 분할된 상태의 화면을 기억하고, 모터 구동시, 상기 세분화된 화면 상의 스텝 수를 카운트하여, 상기 화면에서 감지된 표적의 중심위치가 바로 카메라의 회전방향 좌표로 인식될 수 있도록 설정함이 바람직하다.In this case, the main processing unit, the main processing unit can be operated independently, as well as can be connected to the external host computer 30 through the data transmission and reception means 130, so that the host computer The operation can be controlled by the command being made. In this case, the main processing unit 100 must store a unique identification code of the camera controlled by the main processing unit 100. In addition, the main processing unit is a preset rotation range of the fan motor and the tilt motor based on the micro-rotation angle of the camera determined by the two motors and the respective deceleration means in order to perform a direct direction change command issued from the outside. It stores the screen of the virtually divided state by the rotation range and the number of steps corresponding to the fine rotation angle of the camera, and counts the number of steps on the subdivided screen when the motor is driven, so that the center position of the target detected on the screen is It is preferable to set so that it can be recognized by the rotational coordinates of the camera.

상기 호스트 컴퓨터(30)는 화면상의 이동좌표(표적) 수신여부를 판단하여, 화면의 중앙좌표와 이동좌표간의 변위를 계산하고, 그 계산된 변위만큼 해당 카메라를 이동시킬 수 있도록 상기 주처리유닛으로 해당 카메라의 식별코드(CID)와 함께 카메라 이동명령을 지시하는 방향전환 판단유닛(도면에는 도시되지 않음)을 포함하여 구성할 수 있다.The host computer 30 determines whether a moving coordinate (target) is received on the screen, calculates a displacement between the center coordinate and the moving coordinate of the screen, and moves the camera to the main processing unit to move the camera by the calculated displacement. It may be configured to include a direction determination unit (not shown in the figure) indicating the camera movement command together with the identification code (CID) of the camera.

그리고, 상기 팬/틸트 구동모터와 감속수단은 각각 스텝 모터와 기어 박스로 구성한다. 특히, 스텝 모터는 그 회전범위를 상기 뷰파인더의 세분화된 화면 스텝수(x축 좌우 각각 240 스텝, y축 상하 각각 80스텝)에 일치시키기 위하여, 18°/pps씩, 각각 240pps, 80pps로 구동되어 초당 12회전을 할 수 있게 하고, 기어 박스는 상기 스텝 모터의 구동출력을 1/48로 감속시켜 672g·cm(max)의 구동토크(drive torque)를 갖게 구성(물론 이것은 상기 세분화된 화면 스텝수에 따라 달라질 수 있음)하여, 상기 팬/틸트 카메라가 90°/sec의 속도로 회전할 수 있도록 설정하는 것이 바람직하다.The pan / tilt drive motor and the deceleration means each comprise a step motor and a gear box. In particular, the stepper motor is driven at 240pps and 80pps by 18 ° / pps to match the rotation range to the subdivided screen steps of the viewfinder (240 steps on the left and right on the x-axis and 80 steps on the y-axis on the bottom). 12 revolutions per second, and the gearbox has a drive torque of 672 g · cm (max) by decelerating the drive output of the step motor to 1/48 (of course this is the granular screen step). It is preferable to set so that the pan / tilt camera can rotate at a speed of 90 ° / sec.

또한, 팬/틸트 카메라의 중심은 카메라 구동의 기준점이 되는 위치로서, 전원이 투입된 직후 팬/틸트 카메라(180)는 일단 이 방향을 향하게 되며, 이 지점에서 사용자 기본 지정방향(customer default)으로 회전하거나 사용자의 요구에 의해 임의의 방향으로 회전하게 된다.In addition, the center of the pan / tilt camera is a reference point for driving the camera, and immediately after the power is turned on, the pan / tilt camera 180 once faces in this direction, and rotates in the customer default direction at this point. Or rotate in any direction at the request of the user.

한편, 카메라 식별코드(CID)는 공장 출고값이 x'00'이며, 외부에서 주어지는 명령에 의해 x'00'-x'FF'로 임의 변경이 가능하게 된다. 모든 팬/틸트 카메라는 자신만의 고유한 카메라 식별코드(CID)와 공통의 매크로 식별코드(MID)를 인식하며, 매크로 식별코드는 고유의 카메라 식별코드에 관계없이 공통적으로 사용되는 카메라 식별코드로서, x'00'으로 설정한다.On the other hand, the camera identification code (CID) has a factory default value of x'00 ', and can be arbitrarily changed to x'00'-x'FF' by an external command. Every pan / tilt camera recognizes its own unique camera identification code (CID) and common macro identification code (MID), and the macro identification code is a commonly used camera identification code regardless of the unique camera identification code. , set to x'00 '.

도 2는 호스트 컴퓨터의 방향전환 판단유닛에서 표적이 검출된 임의 카메라에 카메라 이동명령을 발생시키기 위하여 수행하는 신호처리 흐름을 예로 들어 도시한 도면으로서, 화면상의 이동좌표(표적)가 수신되는지를 판단하는 단계(S31)와, 화면의 중앙좌표와 상기 수신된 이동좌표의 변위를 계산하여 카메라의 좌표값으로 변환하는 단계(S32, S33)와, 상기 변환된 변위를 현재의 카메라의 위치좌표에 대입하여, 그 값이 카메라의 이동범위를 벗어났는지를 체크하는 단계(S34, S35)와, 상기 위치좌표를 체크한 결과 카메라의 이동범위를 벗어난 경우에는 그 벗어난 좌표를 수정하여 카메라 이동명령을 지시하고, 카메라의 이동범위를 벗어나지 않았으면 곧 바로 카메라 이동명령을 지시하는 단계(S36, S37)를 포함하여 구성할 수 있다.FIG. 2 is a diagram illustrating a signal processing flow performed to generate a camera movement command to an arbitrary camera where a target is detected by a redirection determination unit of a host computer, for example, to determine whether a moving coordinate (target) on a screen is received. (S31), calculating the displacements of the center coordinates of the screen and the received movement coordinates and converting them to coordinates of the camera (S32, S33), and substituting the converted displacements into the position coordinates of the current camera. And checking whether the value is out of the moving range of the camera (S34, S35), and if the location coordinate is out of the moving range of the camera, correcting the out of coordinates to instruct the camera moving command. If it is not out of the moving range of the camera, it may be configured to include a step (S36, S37) immediately instructing a camera movement command.

도 3은 상기 도 2의 카메라 이동명령에 의해 실행되는 본 발명의 팬/틸트 카메라 제어방법을 설명하기 위하여 도시한 도 1의 주처리유닛에서의 신호처리 흐름도로서, 본 발명 방법의 일 실시예는 외부에서 전달되는 자신에 대한 직접 방향전환명령을 수신 대기하는 과정(S201-S205)과, 상기 직접 방향전환명령이 수신되면, 자신의 카메라에 대한 현재 화면 중심위치와 표적의 중심위치를 이용하여, 카메라 회전방향과 이동량을 산출하는 이동량 산출과정(S207-S211)과, 일정한 주기의 타이머 인터럽트에 의해 상기 팬모터 및 틸트모터를 구동시켜, 기설정된 회전속도 및 상기 계산된 회전방향과 이동량을 기준으로 상기 자신의 카메라를 이동시키는 모터 제어과정(S212-S223)을 포함하여 구성할 수 있다. 여기서, 상기 직접 방향전환명령 수신 대기과정은, 외부로부터 전달되는 카메라 식별코드를 체크하여 자신에게 해당하는 명령을 선택적으로 수신하는 단계(S201)와, 상기 수신된 명령을 번역(S203)하여, 직접 방향전환명령인지를 판단하는 단계(S205)를 포함할 수 있으며, 상기 직접 방향전환명령은 해당 카메라에 포착된 표적의 중심좌표를 기준방향으로 지정하는 방향지정함수에 의해 이루어지는 것은 물론이다.FIG. 3 is a signal processing flowchart of the main processing unit of FIG. 1 illustrated to explain the method of controlling the pan / tilt camera of the present invention executed by the camera movement command of FIG. 2. (S201-S205) of receiving a direct redirection command for itself transmitted from the outside, and when the direct redirection command is received, using the current screen center position of the camera and the center position of the target. A movement amount calculation process (S207-S211) for calculating a camera rotation direction and a movement amount, and the fan motor and the tilt motor are driven by a timer interrupt of a predetermined period, and based on a predetermined rotation speed and the calculated rotation direction and movement amount. It may be configured to include a motor control process (S212-S223) for moving the own camera. Here, the direct redirection command reception waiting step, by checking the camera identification code transmitted from the outside to selectively receive a command corresponding to itself (S201), and translates the received command (S203), directly It may include a step (S205) for determining whether the direction change command, the direct direction change command is of course made by a direction specifying function for designating the center coordinates of the target captured by the camera as a reference direction.

상기의 신호 처리 흐름은 좌우회전을 위한 팬모터 및 그 구동회로와, 상하회전을 위한 틸트모터 및 그 구동회로를 구비하고, 상기 두 모터 각각에 감속수단을 통해 기계적으로 결합시킨 다수의 카메라를 하나의 호스트 컴퓨터(도면에는 도시되지 않음)에 각각 병렬로 연결한 상태에서, 상기 호스트 컴퓨터에서 하달되는 직접 방향전환명령을 상기 주처리유닛이 수신하여, 상기 각각의 모터 및 구동회로에 의해 자신의 카메라를 좌우 또는 상하방향으로 제어하는 장치에서의 실현과정을 도시한 일 실시예에 불과한 것이다.The signal processing flow includes a fan motor for left and right rotation and its driving circuit, a tilt motor for up and down rotation and its driving circuit, and a plurality of cameras mechanically coupled to each of the two motors through a deceleration means. The main processing unit receives a direct redirection command from the host computer in parallel with the host computer (not shown in the drawing), respectively, and transmits its own camera by the respective motor and the driving circuit. It is just one embodiment showing the implementation process in the device for controlling the right and left or up and down direction.

이러한 신호 처리흐름은, 단일 카메라 제어장치에서는, 현재 카메라의 화면 중심위치와 카메라에 포착되는 표적의 중심위치를 이용하여, 카메라가 이동해야 할 회전방향과 이동량을 산출하는 이동량 산출과정과, 일정한 주기의 타이머 인터럽트에 의해 상기 팬모터 및 틸트모터를 구동시켜, 기설정된 회전속도 및 상기 계산된 회전방향과 이동량을 기준으로 상기 카메라를 이동시키는 모터 제어과정만으로도 또 하나의 실시예가 이루어질 수 있음은 물론이다.This signal processing flow is a movement amount calculation process that calculates the rotation direction and the amount of movement to be moved by the camera using a center position of the screen captured by the current camera and the center position of the target captured by the camera, and a constant period. Another embodiment can be achieved by only a motor control process of driving the fan motor and the tilt motor by a timer interrupt of and moving the camera based on a predetermined rotation speed and the calculated rotation direction and movement amount. .

상기 본 발명 방법의 각 실시예에서, 상기 이동량 산출과정에서는, 상기 두 모터와 감속수단에 의해 결정되는 카메라의 미세회전각도로 두 모터의 수평회전범위와 수직회전범위를 미리 설정하고, 상기 카메라의 미세회전각도와 일치하는 스텝수로 화면을 세분화하여, 상기 화면에서 감지된 표적의 중심위치를 카메라의 회전방향 좌표로 인식한다.In each embodiment of the method of the present invention, in the movement amount calculation process, the horizontal rotation range and the vertical rotation range of the two motors are set in advance at the minute rotation angle of the camera determined by the two motors and the deceleration means, and the The screen is subdivided by the number of steps corresponding to the fine rotation angle, and the center position of the target detected on the screen is recognized as the rotation direction coordinate of the camera.

도 4는 상기 모터 제어과정에서 실행되는 도 3의 모터구동 서브루틴(S217)에 대한 신호처리 흐름을 예를 들어 도시한 것으로서, 미리 정해진 주기의 매 타이머 인터럽트마다, 팬모터의 회전스텝수(Pcnt)와 회전속도 복제값(Pidle)을 체크하면서 모터 구동펄스의 상태 카운트값(Pstate)과 회전방향(Pdir)을 참고하여 팬모터를 전진 또는 후진 구동시키는 단계(S217-1 내지 S217-11)와; 미리 정해진 주기의 매 타이머 인터럽트마다, 틸트모터의 회전 스텝수(Tcnt)와 회전속도 복제값(Tidle)을 체크하면서 모터 구동펄스의 상태 카운트값(Tstate)과 회전방향(Tdir)을 참고하여 틸트모터를 전진 또는 후진 구동시키는 단계(S217-21 내지 S217-33)를 포함할 수 있다.FIG. 4 illustrates a signal processing flow for the motor driving subroutine S217 of FIG. 3 executed in the motor control process, for example, and the number of rotation steps Pcnt of the fan motor is performed for every timer interrupt of a predetermined period. ) And driving the fan motor forward or backward by referring to the state count value (Pstate) and the rotation direction (Pdir) of the motor driving pulse while checking the rotation speed replication value (Pidle) (S217-1 to S217-11) and ; For each timer interrupt of a predetermined period, the tilt motor is referred to by referring to the state count value (Tstate) and the rotation direction (Tdir) of the motor driving pulse while checking the rotation step number (Tcnt) and the rotation speed replica value (Tidle) of the tilt motor. It may include the step (S217-21 to S217-33) for driving forward or backward.

상기 팬모터 구동단계는, 타이머 인터럽트가 발생되면 실행되는 것으로서, 상기 매 모터구동펄스의 주기(Pcycle)마다 팬모터의 회전스텝수(Pcnt)와 다음 모터구동펄스까지의 지연시간을 결정하는 회전속도 복제값(Pidle)을 체크하여 팬모터의 회전속도를 조절하면서 팬모터 구동여부를 결정하는 단계(S217-1 내지 S217-5 & S217-13)와, 상기 모터구동펄스의 각 상태에 따라 구분되는 상태 카운트값(Pstate)과 팬모터의 회전방향(Pdir)을 참고로 일련의 모터구동펄스를 출력하여 팬모터를 전진 또는 후진 구동시키는 단계(S217-7, S217-8)와, 상기 모터구동펄스의 상태 카운트값(Pstate)을 체크하여 1개의 모터구동 사이클(Pcycle)이 끝난 시점을 검출하고 그 시점에서 상태 카운트값(Pstate)과 회전속도 복제값(Pidle)을 초기화 및 팬모터의 회전스텝수(Pcnt)를 갱신 및 현재 팬모터의 위치(Plast)를 저장하는 단계(S217-9, S217-11)를 포함하여 구성할 수 있다.The fan motor driving step is executed when a timer interrupt occurs, and determines the rotation speed Pcnt of the fan motor and the delay time to the next motor driving pulse at each cycle of the motor driving pulses. Determining whether or not the fan motor is driven by adjusting the rotational speed of the fan motor by checking the duplicate value (Pidle) and are divided according to each state of the motor driving pulse Driving a fan motor forward or backward by outputting a series of motor drive pulses with reference to the state count value Pstate and the rotation direction Pdir of the fan motor (S217-7, S217-8), and the motor drive pulses. Check the state count value (Pstate) at the end of one motor drive cycle (Pcycle), and detect the state count value (Pstate) and the rotation speed replica value (Pidle) at that time, and the number of rotation steps of the fan motor (Pcnt) renewed and the current fan motor And it can be configured comprising the step of storing the value (Plast) (S217-9, S217-11).

상기 틸트모터 구동단계는, 타이머 인터럽트 발생과 동시에 수행되는 것으로서, 상기 매 모터구동펄스의 주기(Tcycle)마다 틸트모터의 회전스텝수(Tcnt)와 다음 모터구동펄스까지의 지연시간을 결정하는 회전속도 복제값(Tidle)을 체크하여 틸트모터의 회전속도를 조절하면서 틸트모터 구동여부를 결정하는 단계(S217-21 내지 S217-25 & S217-33)와, 상기 모터구동펄스의 각 상태에 따라 구분되는 상태 카운트값(Tstate)과 틸트모터의 회전방향(Tdir)을 참고로 일련의 모터구동펄스를 출력하여 틸트모터를 전진 또는 후진 구동시키는 단계(S217-27, S217-28)와, 상기 모터구동펄스의 상태 카운트값(Tstate)을 체크하여 1개의 모터구동 사이클(Tcycle)이 끝난 시점을 검출하고 그 시점에서 상태 카운트값(Tstate)과 회전속도복제값(Tidle)을 초기화 및 틸트모터의 회전스텝수(Tcnt)를 갱신 및 현재 틸트모터의 위치(Tlast)를 저장하는 단계(S217-29, S217-31)를 포함하여 구성할 수 있다.The tilt motor driving step is performed at the same time as the occurrence of the timer interrupt, and determines the rotation speed Tcnt of the tilt motor and the delay time to the next motor driving pulse at each cycle of the motor driving pulses. Determining whether the tilt motor is driven by adjusting the rotational speed of the tilt motor by checking the copy value (Tidle) (S217-21 to S217-25 & S217-33), and is divided according to each state of the motor driving pulse Driving a tilt motor forward or backward by outputting a series of motor driving pulses with reference to a state count value (Tstate) and the rotation direction (Tdir) of the tilt motor (S217-27, S217-28), and the motor driving pulses. Check the state count value (Tstate) of the motor to detect when one motor drive cycle (Tcycle) is finished, and initialize the state count value (Tstate) and the rotation speed replication value (Tidle) at that time, and the number of rotation steps of the tilt motor. Gang (Tcnt) And it may be configured to include a step (S217-29, S217-31) to save the current location (Tlast) of the tilt motor.

이때, 상기 팬모터 구동단계 및 틸트모터 구동단계를 각각 별개로 독립적인 구동에 의해 제어할 수 있으며, 따라서 상기 팬모터 구동단계 및 틸트모터 구동단계를 순차적으로, 또는 순서를 바꾸어서 수행할 수 있음은 물론이다.In this case, the fan motor driving step and the tilt motor driving step may be controlled separately by independent driving, and thus, the fan motor driving step and the tilt motor driving step may be performed sequentially or in a different order. Of course.

도 5는 본 발명에서 정의되는 모터구동펄스와 그 변수들을 설명하기 위한 파형예도로서, 2극 스텝모터에서 두 극에 각각 공급되는 두 펄스(P1)(P2)와, 모터구동펄스(P3)의 모양과 용어를 정의하기 위하여 도시한 것이다. 여기서 t0, t1, t2, t3는 팬모터 구동펄스의 4가지 상태(state)를 구분하기 위한 것이고, t0-t3까지의 두 펄스(P1)(P2)신호는 정회전 구동의 경우를 예로 들어 표시한 것이다. Pcycle은 1개의 팬모터 구동펄스 출력 주기를 나타내며, 모터 구동을 지연시켜 주기 위해 사용하는 변수(Pidle; 미리 지정된 모터의 회전속도(Prate)를 복제한 값)와, 이 변수(Pidle)로부터 to, t1, t2, t3로 표시되는 팬모터 구동펄스 출력시간(Pstate)을 포함한다. Pcnt는 구동시키고자 하는 Pcycle의 값을 나타내며, 카메라를 실질적으로 제어하는 외부의 컴퓨터나 주제어장치로부터 정해주게 된다.FIG. 5 is a waveform example for explaining the motor driving pulse and its variables defined in the present invention. FIG. 5 is a diagram illustrating two pulses P1 and P2 supplied to two poles in a two-pole step motor and a motor driving pulse P3. It is shown to define the shape and terminology. Here, t0, t1, t2, and t3 are for distinguishing four states of the fan motor driving pulses, and two pulses (P1) and (P2) signals from t0-t3 are displayed as an example of forward rotation driving. It is. Pcycle represents one fan motor drive pulse output cycle, and the variable used to delay the motor drive (Pidle, a duplicate value of a predetermined motor's rotation rate), and from this variable to Fan motor drive pulse output time (Pstate) is indicated by t1, t2, t3. Pcnt represents the value of Pcycle to be driven, and is determined from an external computer or main control device that actually controls the camera.

그리고, 도면에 도시되지는 않았으나, 틸트모터 구동펄스에 대해서도 상기 팬모터 구동펄스와 동일하게 도시될 수 있으므로, 그 설명은 생략한다.Although not shown in the drawings, the tilt motor driving pulse may also be shown in the same manner as the fan motor driving pulse, and thus description thereof will be omitted.

도 6a와 도 6b는 현재 카메라의 중심이 좌표 M(x1, y1)에 있을 때 임의 좌표 T(x2, y2)를 중심으로 하는 표적이 검출되었을 경우, 주처리유닛은 세분화된 화면 상의 스텝을 이용하여, 두 좌표 간의 x축 변위(|x2-x1|) 및 y축 변위(|y2-y1|)를 계산하여 화면의 중앙(0,0)에 표적이 위치하도록 표적 중심(x2, y2)을 상기 계산된 변위만큼 이동시킨 결과를 도시한 것이다.6A and 6B show that when a target centered on an arbitrary coordinate T (x2, y2) is detected when the center of the current camera is at coordinate M (x1, y1), the main processing unit uses the steps on the subdivided screen. By calculating the x-axis displacement (| x2-x1 |) and y-axis displacement (| y2-y1 |) between the two coordinates, the target center (x2, y2) is positioned so that the target is positioned at the center (0,0) of the screen. The result of moving by the calculated displacement is shown.

도 6c는 카메라가 움직일 수 있는 일정한 간격으로 세분화된 최대 회전범위(바탕부분 전체)를 표시한 것이고, 중앙의 직사각 부분은 카메라에 비춰진 뷰 파인더화면을 표시한 것이다. 카메라의 중심은 상기 최대 회전범위 안에서 좌우 상하로 이동하여 필요한 부분만을 화면에 비춰주는 것을 도시하고 있다.FIG. 6C shows the maximum rotation range (whole background) subdivided at regular intervals in which the camera can move, and the rectangular portion in the center shows the view finder screen reflected on the camera. The center of the camera is moved up and down and up and down within the maximum rotation range to show only necessary portions on the screen.

이상에서 기술한 바와 같은 본 발명의 동작 및 그에 따른 작용 효과를 설명하면 다음과 같다. 단, 이하의 본 발명에 대한 동작은 다수의 팬/틸트 카메라가 호스트 컴퓨터에 병렬로 연결되어 제어되는 경우를 예로 든다.Referring to the operation of the present invention and the resulting effects as described above as follows. However, the following operation for the present invention takes a case where a plurality of pan / tilt camera is connected to the host computer in parallel to control.

먼저, 본 발명에 따른 팬/틸트 카메라의 가장 큰 특징은 직접 방향 설정 기능(direct direction addressible feature)을 가지고 있는 것이다. 즉, 현재 카메라의 중심 방향이 임의의 좌표 M(x1, y1) 위치에 있다고 가정할 때, 추적하고자 하는 표적이 좌표 T(x2, y2)위치에서 검출되었다면, 호스트 컴퓨터의 방향전환 판단유닛에서는 화면상에서 이를 검출하여 도 2의 신호 처리 흐름을 거쳐 상기 두 좌표간의 변위를 산출하고, 계산된 변위만큼 카메라를 이동시킬 수 있도록 상기 주처리유닛으로 직접 방향전환(move absolute direction)명령을 발생시켜 바로 표적이 위치하는 좌표 T(x2, y2)의 방향으로 카메라를 회전시킬 수 있게 되는 것이다. 이때 x축과 y축의 구동장치는 별개의 독립적 구동으로 최단거리로 지정방향을 향해 회전하게 된다.First, the biggest feature of the pan / tilt camera according to the present invention is that it has a direct direction addressable feature. That is, assuming that the current direction of the center of the camera is at an arbitrary coordinate M (x1, y1) position, if the target to be tracked is detected at the coordinate T (x2, y2) position, the screen of the host computer's redirection determination unit It detects this on the image, calculates the displacement between the two coordinates through the signal processing flow of FIG. 2, and generates a move absolute direction command directly to the main processing unit so that the camera can be moved by the calculated displacement. The camera can be rotated in the direction of the coordinate T (x2, y2). At this time, the driving device of the x-axis and the y-axis rotates toward the designated direction at the shortest distance by separate independent driving.

이를 실현하기 위하여 본 발명에서는 먼저, 팬/틸트 구동모터를 회전각도의제어가 정확한 스텝모터를 각각 채택하여, 18°/pps씩, 각각 240pps, 80pps로 구동되어 초당 12회전하도록 설정하고, 감속수단이 상기 스텝 모터의 구동출력을 1/48로 감속시켜 672g·cm(max)의 구동토크(drive torque)를 갖게 하는 기어박스로 구성되므로, 팬/틸트 카메라(180)는 90°/sec의 속도로 회전할 수 있게 된다. 따라서 팬모터의 수평 회전범위는 0.375°/step으로 좌우 각각 240step씩을 움직여 +90°의 회전범위를 갖게 되고, 틸트모터의 수직 회전범위는 0.375°/step으로 상하 80step씩을 움직여 +30°의 회전범위를 갖게 된다.In order to realize this, in the present invention, first, the pan / tilt driving motor adopts a step motor with precise control of the rotation angle, respectively, and is set at 12 revolutions per second by driving 240pps and 80pps at 18 ° / pps, respectively. The pan / tilt camera 180 has a speed of 90 ° / sec because the gearbox is configured to reduce the drive output of the step motor to 1/48 to give a drive torque of 672 g · cm (max). Can be rotated. Therefore, the horizontal rotation range of the fan motor is 0.375 ° / step, moving 240 steps left and right, respectively, to have a rotation range of + 90 °, and the vertical rotation range of the tilt motor is 0.375 ° / step, moving 80 steps up and down, + 30 ° rotation range. Will have

또한 카메라의 방향 지정을 명확하게 하기 위하여, 스텝모터와 감속기어에 의해 정해지는 미세한 각도로 수평 회전범위 및 수직 회전범위를 미리 지정해두고, 뷰 파인더의 화면을 상기 카메라의 미세회전각도와 일치하도록 정합 세분화함으로써, 화면에서 감지된 표적의 위치가 바로 카메라의 회전방향 좌표가 된다.In addition, in order to clarify the direction of the camera, the horizontal rotation range and the vertical rotation range are specified in advance at a minute angle determined by the step motor and the reduction gear, and the screen of the viewfinder is matched with the fine rotation angle of the camera. By subdividing, the position of the target detected on the screen is the coordinate of the rotation direction of the camera.

도 3에 도시된 바와 같이, 팬/틸트 카메라 제어를 위한 신호처리과정은, 주처리유닛(100)에서 RS-232 시리얼 통신을 통해 외부의 컴퓨터로 부터 지시되는 여러 가지 복잡한 명령어를 분석한 결과, 직접 방향전환명령에 의해 구동된다. 그리고 팬모터 및 틸트모터 제어를 위한 모터구동신호 처리과정은, 상기 MPU가 상기 타이머 수단에 몇 개의 변수를 제공함으로써, 타이머 수단(110)에서 주기적으로 제공되는 타이머 인터럽트에 의해 시작된다.As shown in Figure 3, the signal processing for controlling the pan / tilt camera, the main processing unit 100, as a result of analyzing a variety of complex commands directed from an external computer through RS-232 serial communication, Driven by direct redirection command. The motor drive signal processing for controlling the fan motor and the tilt motor is started by a timer interrupt periodically provided by the timer means 110 by providing the MPU with some variables.

먼저, 주처리 유닛(100)은 외부로부터 전달되는 카메라 식별코드(CID)를 체크하여 자신에게 해당하는 명령을 선택적으로 수신(S201)하고, 상기 수신된 명령을 번역(S203)하여, 직접 방향전환명령인지를 판단(S205)한다. 이때 상기 직접 방향전환명령은 표적의 중심좌표를 기준방향으로 지정하는 방향지정함수에 의해 이루어진다. 상기 판단 결과, 외부에서 직접 방향전환명령이 수신되면, 자신의 카메라에 대한 현재 화면 중심위치와 표적의 중심위치를 각각 판독(S207, S209)하고, 그로부터 카메라 회전방향(Pdir, Tdir)과 이동량(Pcnt, Tcnt)을 산출(S211)한다.First, the main processing unit 100 checks a camera identification code (CID) transmitted from the outside to selectively receive a command corresponding to itself (S201), translates the received command (S203), and directly redirects the direction. It is determined whether or not the instruction (S205). At this time, the direct direction change command is made by a direction specifying function that designates the center coordinate of the target as the reference direction. As a result of the determination, when a direct direction change command is received from the outside, the current screen center position of the camera and the center position of the target are read (S207, S209), respectively, and the camera rotation directions (Pdir, Tdir) and the movement amount (from there). Pcnt and Tcnt) are calculated (S211).

만약 도 6a와 같은 상태로 표적이 검출된 경우, 주처리유닛(100)은 x1-x2=Pcnt, y1-y2=Tcnt로 각각 그 차를 산출하여 타이머 인터럽트로 송출하게 되며, 이때 산출된 + 및 -기호는 모터의 회전방향을 가리켜주는 Pdir과 Tdir로 각각 타이머 인터럽트에 송출된다.If the target is detected in the state as shown in FIG. 6A, the main processing unit 100 calculates the difference as x1-x2 = Pcnt and y1-y2 = Tcnt, respectively, and sends the difference as a timer interrupt, wherein the calculated + and The symbol-Pdir and Tdir, indicating the direction of rotation of the motor, is sent to the timer interrupt, respectively.

앞에서 설명된 바와 같이 타이머 인터럽트는 Pdir, Pcount, Tdir, Tcount이 설정된 시간부터 모터의 구동을 시작하게 되며, 이때 모터의 구동속도는 별개의 명령으로 이미 팬/틸트 카메라에 설정되어 있는 Prate를 참고하게 되는 것이다.As described above, the timer interrupt starts the motor operation from the time Pdir, Pcount, Tdir, and Tcount are set. At this time, the motor's driving speed is a separate command to refer to the Prate already set in the pan / tilt camera. Will be.

그리고 모터 구동에 필요한 여러 변수들을 초기화(S212)시킨 후, 타이머 수단(S213)을 작동시켜 일정한 주기의 타이머 인터럽트에 의해 모터구동신호 처리과정을 수행함으로써, 상기 팬모터 또는 틸트모터를 순차적으로 구동시켜, 표적 중심이 화면 중심이 될 때까지 카메라를 회전시킨다. 이때 상기 모터 회전속도는 기설정된 회전속도(Prate)(Trate)를 기준으로 정해진다.After initializing various variables required for driving the motor (S212), the timer means (S213) is operated to perform a motor driving signal process by a timer interrupt of a predetermined period, thereby sequentially driving the fan motor or the tilt motor. Rotate the camera until the target center is centered on the screen. At this time, the motor rotation speed is determined based on a preset rotation speed (Trate).

상기 모터구동신호 처리과정에서는, 팬모터의 회전방향을 정해주는 변수(Pdir), 스텝모터의 회전각도를 정해주는 변수(Pcount), 회전속도를 조절하는 변수(Prate)는 외부 장치로부터 입력으로 받아 팬모터를 임의의 방향으로 회전시키게 된다.In the motor driving signal processing process, a variable (Pdir) for determining the rotation direction of the fan motor, a variable (Pcount) for determining the rotation angle of the step motor, and a variable (Prate) for adjusting the rotation speed are received as an input from an external device. The fan motor is rotated in any direction.

즉, 도 4에서와 같이, S217-1 단계에서는 팬모터 회전스텝수(Pcnt)를 검사하여 팬모터를 구동시킬것인지 아닌지를 결정한다. 여기서 Pcnt의 값이 '0'인 경우에는 더 이상 모터를 구동시킬 필요가 없는 것으로 인지하여 모터구동을 중단시키게 되고, '0'이 아닌 값이 검출된 경우에는 '0'이 될 때까지 모터를 구동시킨다. 이때 Pcnt의 업데이트는 1개의 모터구동펄스 출력 사이클(Pcycle)이 완전히 끝나는 시점인 S217-11 단계에서 수행된다.That is, as shown in FIG. 4, in step S217-1, the fan motor rotation step number Pcnt is checked to determine whether to drive the fan motor. If the value of Pcnt is '0', it recognizes that it is no longer necessary to drive the motor and stops the motor drive. If a value other than '0' is detected, the motor is stopped until it becomes '0'. Drive it. At this time, the update of Pcnt is performed at step S217-11, at which time one motor driving pulse output cycle is completely completed.

다음으로 S217-3 단계와 S217-5 단계에서는 팬모터 회전속도(Prate)의 값이 복재된 변수(Pidle)을 매 Pcycle 마다 카운트하여 팬모터의 회전속도를 조절하는 기능을 수행한다.Next, in steps S217-3 and S217-5, a variable in which the fan motor rotation speed (Prate) is duplicated is counted every Pcycle to control the rotation speed of the fan motor.

다음으로 S217-7 단계에서는 t0에서 t3까지 4개로 구분되는 상태 카운트값(Pstate)과 모터의 회전방향을 나타내는 팬모터 회전방향(Pdir)을 참고하여 일련의 펄스신호를 팬모터에 출력시키는 처리과정이다. 이 펄스신호에 의해 모터는 전진 또는 후진 구동을 하게 된다.Next, in step S217-7, a process of outputting a series of pulse signals to the fan motor by referring to the state count value (Pstate) divided into four from t0 to t3 and the fan motor rotation direction (Pdir) indicating the rotation direction of the motor. to be. This pulse signal causes the motor to drive forward or backward.

다음으로 S217-9 단계에서는 상기 S217-7 단계에 의해 사용되는 상태 카운트를 업데이터시키고, 상태 카운트의 값이 t0-t3의 범위로 유지시켜주는 기능을 한다. 즉 Pstate는 t0-t1-t2-t3-t0-t1-t2-…와 같이 매 인터럽트마다 변화하게 한다.Next, in step S217-9, the state count used in step S217-7 is updated, and the value of the state count is maintained in the range of t0-t3. That is, Pstate is represented by t0-t1-t2-t3-t0-t1-t2-. To be changed at every interrupt.

다음으로 S217-11 단계에서는 1개의 Pidle로부터 t0-t3까지의 모터구동출력 사이클인 Pcycle이 끝난 시점에서 Pstate를 t0로 초기화하고, 다음의 모터구동펄스까지 지연시간을 결정해주는 Pidle에 Prate를 복사해줌으로써, Pidle의 값을 초기화시킨다. 그리고 1개의 구동 사이클이 끝남에 따라 모터의 구동 사이클인 Pcnt를업데이터시키고, 마지막으로 현재의 모터가 어느 위치에 있는지를 알게 해주는 Plast를 비휘발성 메모리인 제 2데이터 저장수단(NVRAM)에 기억시키는 기능을 수행한다.Next, in step S217-11, Pstate is initialized to t0 at the end of Pcycle, which is the motor drive output cycle from one Pidle to t0-t3, and the Prate is copied to the Pidle that determines the delay time to the next motor drive pulse. Zoom in to initialize the value of the Pidle. And, as one drive cycle ends, the Pcnt, which is the drive cycle of the motor, is up dataed, and finally, Plast, which informs the position of the current motor, is stored in the second data storage means (NVRAM), which is a nonvolatile memory. Do this.

여기서, Pidle은 매 타이머 인터럽트를 카운트하여 모터구동 사이클의 주기를 조절해 줌으로써, 모터의 구동속도를 변화시켜주는 기능을 한다.Here, the Pidle functions to change the driving speed of the motor by counting the timer interrupts and adjusting the period of the motor driving cycle.

이하의 틸트 모터 구동단계(S217-21 내지 S217-33)는 상기 팬모터 구동과 완전히 동일하며, 상기 팬모터 구동 플로우 차트의 앞이나 뒤에 연결하여 사용하게 된다.The following tilt motor driving steps (S217-21 to S217-33) are completely the same as the fan motor driving, and are connected to the front or the rear of the fan motor driving flowchart.

이상에서와 같은 본 발명에 의하면, 일정한 간격으로 화면을 가상 분할하여 세분화시키고, 그 분할된 화면 상의 좌표로 표적 위치를 검출하여 카메라를 직접 이동시킴으로써, 카메라에 포착되는 표적을 신속하게 추적할 수 있게 하므로, 영상 인식에 의한 표적의 추적 및 소프트 웨어 처리를 간편하게 해주고, 그 처리속도를 높여주며, 카메라의 회전을 빠르게 할 수 있는 이점이 있다.According to the present invention as described above, it is possible to quickly track the target captured by the camera by virtually dividing and subdividing the screen at regular intervals, detecting the target position by the coordinates on the divided screen, and moving the camera directly. Therefore, there is an advantage of simplifying the tracking and software processing of the target by image recognition, increasing its processing speed, and speeding up the rotation of the camera.

Claims (4)

좌우 및 상하회전을 위한 팬모터 및 틸트모터와 그 구동(x축 구동 및 y축 구동)회로를 포함하고 상기 두 모터 각각에 감속수단을 통해 기계적으로 결합된 카메라를 피사체의 움직임을 따라 좌우 또는 상하방향으로 제어하는 방법에 있어서,A camera including a fan motor, a tilt motor, and a driving circuit (x-axis driving and y-axis driving) for left and right rotation, and mechanically coupled to each of the two motors through a deceleration means according to the movement of the subject. In the control method in the direction, 상기 카메라의 촬상화면 전체영역을 X-Y 평면상의 좌표값을 갖는 다수의 영역으로 분할하여 세분화된 각 분할영역의 위치좌표를 설정하는 초기 설정과정과;An initial setting step of dividing the entire photographed screen area of the camera into a plurality of areas having coordinate values on an X-Y plane to set position coordinates of each subdivided area; 상기 세분화된 촬상화면에 피사체가 포착되면 상기 설정된 분할영역별 위치좌표를 기준으로 상기 촬상화면 내의 피사체의 중심좌표를 인식하여 카메라의 촬상화면 중앙으로 피사체를 포착하기 위해 상기 카메라가 이동해야 할 회전방향과 이동량을 산출하는 이동량 산출과정과;When the subject is captured on the subdivided captured screen, the rotation direction to which the camera should move to recognize the center coordinate of the subject in the captured screen based on the set position coordinates of the divided regions and capture the subject toward the center of the captured screen of the camera A moving amount calculating step of calculating a moving amount; 일정한 주기로 발생되는 매 타이머 인터럽트마다 상기 두 모터의 회전스텝수를 각각 카운트하여 상기 매 회전스텝마다 상기 산출된 회전방향과 이동량 및 상기 두 모터와 감속수단에 의해 기 설정된 카메라의 회전속도를 기준으로 상기 팬모터와 틸트모터를 1회 이상 각각 번갈아 구동시켜, 상기 촬상화면 상의 피사체의 중심좌표를 향하는 대각방향으로 상기 카메라를 직접 이동시키는 팬모터 구동단계 및 틸트모터 구동단계로 이루어진 모터 제어과정을 포함하는 것을 특징으로 하는 팬/틸트 카메라 제어방법.The number of rotation steps of the two motors is counted for each timer interrupt generated at a predetermined cycle, and the rotation speed and movement amount of the two motors are counted for each rotation step, and the rotation speed of the camera preset by the two motors and the deceleration means is determined. And a motor control process comprising a fan motor driving step and a tilt motor driving step of driving the fan motor and the tilt motor alternately one or more times, respectively, to directly move the camera in a diagonal direction toward the center coordinate of the subject on the imaging screen. Pan / tilt camera control method characterized in that. 제 3항에 있어서,The method of claim 3, wherein 상기 초기 설정과정은, 상기 카메라를 하나 이상 구비하여 그 각각에 자신만의 고유한 카메라 식별코드를 각각 기억시키는 단계와, 상기 고유의 카메라 식별코드를 가진 하나 이상의 카메라를 병렬로 연결하여 제어라인을 통해 호스트 컴퓨터에 접속하고 상기 호스트 컴퓨터와의 송수신정보 교환을 위한 환경을 구축하는 단계를 더 포함하고,The initial setting process includes the steps of storing at least one camera with its own unique camera identification code, and connecting one or more cameras having the unique camera identification code in parallel to control lines. Establishing an environment for accessing a host computer and exchanging information with the host computer through the host computer; 상기 이동량 산출과정은, 상기 세분화된 촬상화면에 피사체가 포착되면 상기 구축된 제어라인을 통해 상기 호스트 컴퓨터로 피사체의 위치좌표값을 전달하고 그에 대응하여 상기 호스트 컴퓨터로부터 하달되는 명령을 상기 카메라 식별코드 비교에 의해 선택적으로 수신하여 해당 수신명령이 카메라에 포착된 피사체의 중심좌표를 기준방향으로 지정하는 방향지정함수에 의해 이루어지는 직접 방향전환명령인지를 판단하는 단계를 더 포함하여서, 상기 호스트 컴퓨터에서 직접 방향전환명령이 주어지는 조건에 의해 상기 카메라가 이동해야 할 회전방향과 이동량을 산출하는 동작이 처리되도록 구성한 것을 특징으로 하는 팬/틸트 카메라 제어방법.The moving amount calculating process may include, when the subject is captured on the subdivided captured image, transferring the position coordinate value of the subject to the host computer through the constructed control line, and correspondingly receiving the command from the host computer. Selectively receiving by comparison to determine whether the received command is a direct redirection command made by a direction specifying function that designates the center coordinates of the object captured by the camera as a reference direction, and directly at the host computer. Pan / tilt camera control method characterized in that the operation to calculate the rotation direction and the movement amount to be moved by the camera under the condition that the direction change command is given. 제 11항에 있어서, 상기 팬모터 구동단계는,The method of claim 11, wherein the fan motor driving step, 타이머 인터럽트가 발생되면, 상기 매 모터구동펄스의 주기(Pcycle)마다 팬모터의 회전스텝수(Pcnt)와 다음 모터구동펄스까지의 지연시간을 결정하는 회전속도 복제값(Pidle)을 체크하여, 팬모터의 회전속도를 조절하면서 팬모터 구동여부를 결정하는 단계와;When the timer interrupt is generated, the fan speed is determined by checking the rotation speed (Pcnt) of the fan motor and the rotation speed replication value (Pidle) which determines the delay time to the next motor driving pulse for each cycle of the motor driving pulses. Determining whether to drive the fan motor while adjusting the rotational speed of the motor; 상기 모터구동펄스의 각 상태에 따라 구분되는 상태 카운트값(Pstate)과 팬모터의 회전방향(Pdir)을 참고로 일련의 모터구동펄스를 출력하여, 팬모터를 전진 또는 후진 구동시키는 단계와;Driving a fan motor forward or backward by outputting a series of motor drive pulses with reference to a state count value (Pstate) and a rotation direction (Pdir) of the fan motor classified according to each state of the motor drive pulses; 상기 모터구동펄스의 상태 카운트값(Pstate)을 체크하여 1개의 모터구동 사이클(Pcycle)이 끝난 시점을 검출하고, 그 시점에서 상태 카운트값(Pstate)과 회전속도 복제값(Pidle)을 초기화 및 팬모터의 회전스텝수(Pcnt)를 갱신 및 현재 팬모터의 위치(Plast)를 저장하는 단계를 포함하는 것을 특징으로 하는 팬/틸트 카메라 제어방법.The state count value (Pstate) of the motor drive pulse is checked to detect a time point when one motor drive cycle (Pcycle) is finished, and at that point, the state count value (Pstate) and the rotation speed duplicate value (Pidle) are initialized and the fan is detected. And updating the rotation step number (Pcnt) of the motor and storing the current position (Plast) of the fan motor. 제 11항에 있어서, 상기 틸트모터 구동단계는,The method of claim 11, wherein the tilt motor driving step, 타이머 인터럽트가 발생되면, 상기 매 모터구동펄스의 주기(Tcycle)마다 틸트모터의 회전스텝수(Tcnt)와 다음 모터구동펄스까지의 지연시간을 결정하는 회전속도 복제값(Tidle)을 체크하여, 틸트모터의 회전속도를 조절하면서 틸트모터 구동여부를 결정하는 단계와;When the timer interrupt occurs, the rotation speed number Tcnt which determines the rotational step number Tcnt of the tilt motor and the delay time until the next motor driving pulse is checked for each cycle of the motor driving pulses, and the tilt is performed. Determining whether the tilt motor is driven while adjusting the rotational speed of the motor; 상기 모터구동펄스의 각 상태에 따라 구분되는 상태 카운트값(Tstate)과 틸트모터의 회전방향(Tdir)을 참고로 일련의 모터구동펄스를 출력하여, 틸트모터를 전진 또는 후진 구동시키는 단계와;Driving a tilt motor forward or backward by outputting a series of motor drive pulses with reference to a state count value (Tstate) and a rotation direction (Tdir) of the tilt motor classified according to each state of the motor drive pulses; 상기 모터구동펄스의 상태 카운트값(Tstate)을 체크하여 1개의 모터구동 사이클(Tcycle)이 끝난 시점을 검출하고, 그 시점에서 상태 카운트값(Tstate)과 회전속도 복제값(Tidle)을 초기화 및 틸트모터의 회전스텝수(Tcnt)를 갱신 및 현재 틸트모터의 위치(Tlast)를 저장하는 단계를 포함하는 것을 특징으로 하는 팬/틸트 카메라 제어방법.By checking the state count value (Tstate) of the motor drive pulse to detect the end of one motor drive cycle (Tcycle), at that point initializes and tilts the state count value (Tstate) and the rotational speed replication value (Tidle) And updating the rotation step number (Tcnt) of the motor and storing the current position of the tilt motor (Tlast).
KR1019990022940A 1999-06-18 1999-06-18 Method and apparatus for controlling pan/tilt camera KR100323809B1 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
KR1019990022940A KR100323809B1 (en) 1999-06-18 1999-06-18 Method and apparatus for controlling pan/tilt camera
TW089109308A TW425487B (en) 1999-06-18 2000-05-16 Apparatus and method of controlling pan/tilt camera
GB0012824A GB2351162B (en) 1999-06-18 2000-05-25 Apparatus and method of controlling pan/tilt camera
JP2000161241A JP2001036798A (en) 1999-06-18 2000-05-30 Method and device for controlling pan/tilt camera
DE10029868A DE10029868A1 (en) 1999-06-18 2000-06-16 Device and method for controlling a pivotable / tiltable camera
CN 00109274 CN1278074A (en) 1999-06-18 2000-06-16 Device and method for controlling telecamera to proceed wave taking and elevation/depression taking picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019990022940A KR100323809B1 (en) 1999-06-18 1999-06-18 Method and apparatus for controlling pan/tilt camera

Publications (2)

Publication Number Publication Date
KR20010002888A KR20010002888A (en) 2001-01-15
KR100323809B1 true KR100323809B1 (en) 2002-02-19

Family

ID=19593371

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990022940A KR100323809B1 (en) 1999-06-18 1999-06-18 Method and apparatus for controlling pan/tilt camera

Country Status (1)

Country Link
KR (1) KR100323809B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101019259B1 (en) * 2009-06-26 2011-03-07 전자부품연구원 camera control unit for panning shot

Also Published As

Publication number Publication date
KR20010002888A (en) 2001-01-15

Similar Documents

Publication Publication Date Title
US7256817B2 (en) Following device
EP0689353A2 (en) Display method and apparatus
JP2797830B2 (en) Object Tracking Method for Video Camera
JP2001050723A (en) Distance measuring equipment
US7027041B2 (en) Presentation system
US5930054A (en) Lens position control apparatus
KR101424151B1 (en) Monitoring camera apparatus and controlling method thereof
JP2948463B2 (en) Lens focus state display device and lens focus adjustment device having the same
JP2986428B2 (en) Automatic alignment system for target projector
CN111756990A (en) Image sensor control method, device and system
US7868911B2 (en) Surveillance camera capable of adjusting position and a controlling method thereof
KR100323809B1 (en) Method and apparatus for controlling pan/tilt camera
KR100322751B1 (en) Method for controlling pan/tilt camera
JPH11231202A (en) Device and method for controlling lens and storage medium
JP2001036798A (en) Method and device for controlling pan/tilt camera
JP2962295B2 (en) Automatic attitude control method and automatic attitude control system for built-in camera of automatic information processing device
JP2000304508A (en) Three-dimensional input device
KR100533831B1 (en) CCTV camera having the function of position adjusting and control method thereof
EP3930564B1 (en) Method for operating a 3d body scanner
US5463292A (en) Imaging apparatus having rotary table
KR100382792B1 (en) Intelligent robotic camera and distributed control apparatus thereof
CN111699427B (en) Lens control method and system, lens and imaging device
WO1992011508A1 (en) Object location system
JPH07167616A (en) Human body detection controller and operation controller for air conditioner
Herrington Easy image processing camera interfacing for robotics

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20090728

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee