Recording device, recording method, and recording program
Patent Information
- Application Number
- JP2025036284
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2026-09-17
Smart Images

Figure 2026147988000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a recording device, a recording method, and a recording program. [Background technology]
[0002] Recording devices that start creating recording data at a time intended by the user have been known for some time. Patent Document 1 discloses an imaging device that functions as a recording device.
[0003] The imaging device described in Patent Document 1 adds imaging time information to a frame image and transmits the frame image with the added information to an operating terminal. The operating terminal displays a video to the user based on the received frame image. While the operating terminal is displaying the video, the user performs an operation to start recording. The operating terminal then sends a recording control signal to the imaging device with the imaging time information added to it. The imaging time information added to the recording control signal is the imaging time information that was added to the frame image at the time the user operation was performed. Upon receiving the recording control signal, the imaging device creates recording data by tracing back from the temporarily held video to the frame image corresponding to the added imaging time information. [Prior art documents] [Patent Documents]
[0004] [Patent Document 1] Japanese Patent Publication No. 2013-175819 [Overview of the Initiative] [Problems that the invention aims to solve]
[0005] The above-mentioned Patent Document 1 only mentions usage environments in which recording devices and terminal devices correspond one-to-one, and it is unclear whether it can flexibly handle various communication methods, such as mesh networks, when they are applied.
[0006] The present invention has been made in view of the above circumstances, and an object of the present invention is to substantially start recording at a desired timing while flexibly coping with differences in the configuration of communication means. Means for solving the problem and effects
[0007] The problem to be solved by the present invention is as described above. Next, means for solving this problem and effects thereof will be described.
[0008] According to a first aspect of the present invention, a recording apparatus having the following configuration is provided. That is, the recording apparatus includes a communication unit, a moving image data receiving unit, and a recording unit. The communication unit communicates with an instruction device. The moving image data receiving unit receives moving image data acquired by an imaging device. The recording unit generates the recording data when a recording start instruction, which is an instruction to start generating recording data based on the moving image data, is received from the instruction device. The start time of the time section in which the recording unit generates the recording data is determined based on a retroactive timing that is a timing traced back to the past from the timing at which the communication unit receives the recording start instruction by a delay compensation time determined according to the configuration of communication means between the instruction device and the communication unit.
[0009] With this, even if the time taken for the recording start instruction to reach the recording apparatus from the instruction device changes according to the configuration of the communication means between the recording apparatus and the instruction device, it is possible to flexibly cope with the change and substantially start recording at a timing close to the timing at which the recording start instruction is actually issued in the instruction device.
[0010] In the recording apparatus described above, the following configuration is preferable. That is, the recording apparatus includes a storage unit that stores temporary recording data based on the moving image data for the most recent period before receiving the recording start instruction. The recording unit generates, among the recording data, a portion prior to the reception timing of the recording start instruction based on the temporary recording data.
[0011] With this, among the recording data, a portion prior to the reception timing of the recording start instruction can be appropriately obtained based on the temporary recording data.
[0012] In the aforementioned recording apparatus, it is preferable that the delay compensation time is determined to be different depending on whether or not a communication device is interposed between the indicating device and the recording apparatus.
[0013] The interposition of a communication device affects the configuration of communication means between the instruction device and the recording apparatus, and acts to increase the communication time between the two. By determining the delay compensation time according to whether a communication device is interposed or not, in any case, recording can be substantially started at a timing close to the timing at which the recording start instruction is actually issued by the indicating device.
[0014] In the aforementioned recording apparatus, the following configuration is preferable. That is, a plurality of said communication devices can be interposed between said indicating device and said recording apparatus. The delay compensation time is determined to be different depending on the number of said communication devices interposed between said indicating device and said recording apparatus.
[0015] Regardless of the number of interposed communication devices, by determining the delay compensation time according to the number, recording can be substantially started at a timing close to the timing at which the recording start instruction is actually issued by the indicating device.
[0016] In the aforementioned recording apparatus, the following configuration is preferable. That is, the recording apparatus comprises a plurality of communication interfaces. Said communication interfaces include at least one of wireless communication, serial communication and GPIO communication. The delay compensation time is determined to be different depending on the communication interface to which the recording start instruction is input.
[0017] Differences in communication interfaces affect the configuration of communication means between the instruction device and the recording apparatus, and change the communication time between the two. By determining the delay compensation time according to the communication interface, in any case, recording can be substantially started at a timing close to the timing at which the recording start instruction is actually issued by the indicating device.
[0018] In the aforementioned recording device, the delay compensation time can be determined based on the communication time between the instruction device and the recording device, which is estimated based on the configuration of the communication means.
[0019] In this case, the timing at which recording should actually begin can be determined with a relatively simple process.
[0020] In the aforementioned recording device, the delay compensation time can be determined based on the communication time between the instruction device and the recording device, as measured under the application of the communication means.
[0021] By actually measuring the time required for communication between the instruction device and the recording device, recording can be substantially started at a time closer to the actual timing when the instruction to start recording is given in the instruction device.
[0022] In the aforementioned recording device, the following configuration is preferable. That is, the recording temporary data is encoded and stored using a method employing inter-frame prediction. If the frame corresponding to the retrospective timing in the recording temporary data is not an I-frame in the inter-frame prediction, the start of the time interval is set to a timing earlier than the retrospective timing and corresponding to the I-frame of the recording temporary data.
[0023] This allows temporary recording data to be used as part of the recorded data without decoding and re-encoding. Furthermore, since the first frame of the recorded data becomes an I-frame, the starting frame of the time interval can be correctly displayed during playback of the recorded data.
[0024] According to a second aspect of the present invention, the following recording method is provided for a recording device. That is, the recording method includes a receiving step and a recording step. In the receiving step, video data acquired by an imaging device is received. In the recording step, when a recording start instruction is received from an instruction device, which is an instruction to start creating recording data based on the video data, the recording data is created. In the recording step, the start of the time interval in which the recording data is created is determined based on a retrospective timing, which is a timing that is set back from the timing at which the recording device receives the recording start instruction by a delay compensation time determined according to the configuration of the communication means between the instruction device and the recording device.
[0025] As a result, even if the time it takes for a recording start instruction to reach the recording device from the instruction device varies depending on the configuration of the communication means between the recording device and the instruction device, the system can flexibly respond to this change and effectively start recording at a time close to the time when the recording start instruction is actually given in the instruction device.
[0026] A third aspect of the present invention provides a recording program having the following configuration: that is, the recording program operates a recording device. The recording device receives video data transmitted from an imaging device that acquires video data. The recording device is able to communicate with an instruction device. The recording program causes the recording device to perform a video data reception step and a recording step. In the video data reception step, the recording device receives video data acquired by the imaging device. In the recording step, the recording device creates the recording data when it receives a recording start instruction from the instruction device, which is an instruction to start creating recording data based on the video data. In the recording step, the start of the time interval in which the recording device creates the recording data is determined based on a retrospective timing, which is a timing that is retrospectively set back by a delay compensation time determined according to the configuration of the communication means between the instruction device and the recording device from the timing when the recording device receives the recording start instruction.
[0027] As a result, even if the time it takes for a recording start instruction to reach the recording device from the instruction device varies depending on the configuration of the communication means between the recording device and the instruction device, the system can flexibly respond to this change and effectively start recording at a time close to the time when the recording start instruction is actually given in the instruction device. [Brief explanation of the drawing]
[0028] [Figure 1] A schematic diagram showing the overall configuration of a communication system including a wireless relay device according to one embodiment of the present invention. [Figure 2] A block diagram showing the various functional and interface sections of a wireless relay device. [Figure 3] This graph shows the relationship between the timing at which the wireless relay device receives the recording start trigger signal, the start time of the recording data interval, and the delay compensation time. [Figure 4] A flowchart illustrating the buffer update process and recording process performed by the control unit. [Figure 5] A flowchart illustrating the delay compensation time acquisition process performed by the control unit. [Figure 6] A flowchart illustrating the delay compensation time acquisition process performed by the control unit. [Figure 7] A schematic diagram illustrating an example of mesh connectivity. [Figure 8] A schematic diagram illustrating an example of connection via a wireless client device. [Figure 9] A schematic diagram illustrating the process of further pushing back the corrected recording start date and time in relation to the encoded video data. [Figure 10] A flowchart illustrating the delay compensation time acquisition process performed in the modified example. [Modes for carrying out the invention]
[0029] Next, embodiments of the present invention will be described with reference to the drawings. First, the communication system 1 will be described with reference to Figures 1 and 2. Figure 1 is a schematic diagram showing the overall configuration of the communication system 1, which includes a wireless relay device 20 according to one embodiment of the present invention. Figure 2 is a block diagram showing the various functional parts and interface parts of the wireless relay device 20.
[0030] Communication system 1 is installed in facilities such as factories, parking lots, or offices. Communication system 1 transmits video data created by one or more cameras 71 from a wireless relay device 20 to a client computer 72. Users of communication system 1 can view the content captured by the cameras 71 on the client computer 72.
[0031] Figure 1 shows an example where the client computer 72 is a notebook computer. The configuration of the client computer 72 is arbitrary and can be changed to, for example, a desktop or tablet.
[0032] The communication system 1 can save video data based on the images captured by the camera 71 as a recording file in the wireless relay device 20. Considering this, the communication system 1 can also be called a recording system. The wireless relay device 20 can also be called a recording device. In this embodiment, recording essentially means a series of processes for saving a video file based on the images from the camera 71 so that it can be read later.
[0033] The communication system 1 comprises a wireless router 10 and a wireless relay device 20.
[0034] The wireless router 10 establishes a wireless LAN environment within the facility that conforms to a predetermined wireless communication standard. While IEEE 802.11 is a possible wireless communication standard, it is not limited to this.
[0035] The wireless relay device 20 is configured to connect to one or more cameras 71. The camera 71 is, for example, an imaging device configured as a known IP camera. The connection between the camera 71 and the wireless relay device 20 can be achieved using an appropriate cable, for example, a LAN cable compatible with PoE (Power over Ethernet®).
[0036] The client computer 72 can connect to the wireless relay device 20 using a wireless LAN environment. However, if the wireless relay device 20 has a wired LAN interface, the client computer 72 can also connect to the wireless relay device 20 via a wired LAN. The client computer 72 is an instruction device that the user operates to give various instructions (described later) to the wireless relay device 20.
[0037] The wireless relay device 20 transmits video data captured by the camera 71 to the client computer 72 in real time, based on instructions from the user operating the client computer 72. Client software is pre-installed on the client computer 72. This software can display the video data received from the wireless relay device 20 on the client computer 72's display in real time. The user can use the client computer 72 to remotely monitor the subject captured by the camera 71 (e.g., people, equipment in a facility, etc.) via the wireless relay device 20.
[0038] The wireless relay device 20 can save the video footage captured by the camera 71 as a video file to itself when the user operates and instructs the client computer 72. Hereinafter, this video file may be referred to as a recording file. The recording file is an example of recording data. When the client software is executed on the client computer 72, buttons such as "Start Recording" and "Stop Recording" are displayed on the display as a user interface. User operations for recording include, for example, the user clicking the above buttons on the client computer 72. However, the above user interface is just an example and is not limited to it. The recording file may also include images (e.g., still images) extracted by the wireless relay device 20 from the video footage captured by the camera 71.
[0039] As shown in Figure 2, the wireless relay device 20 includes a communication interface 21, a control unit 22, and a storage unit 23.
[0040] The communication interface 21 enables the transmission and reception of signals with external devices. In this embodiment, the communication interface 21 includes a wireless LAN communication interface 31, a wired LAN communication interface 32, a serial communication interface 33, and a GPIO interface 34. GPIO is an abbreviation for General Purpose Input / Output. The communication interface 21 is also used for communication between the camera 71 and the wireless relay device 20.
[0041] The control unit 22 is realized by an arithmetic unit such as a CPU operating based on a program stored in the memory unit 23. As will be described in detail later, the control unit 22 performs communication-related processing and video data-related processing, etc.
[0042] The storage unit 23 stores programs, control data, video data, etc. The storage unit 23 can be configured as, for example, an HDD, SSD, or flash memory. The storage unit 23 stores a recording program for realizing the recording method according to this embodiment.
[0043] The control unit 22 will now be described in detail. The control unit 22 comprises a communication unit 41, a video data receiving unit 42, a video data transmission unit 43, a buffer update unit 44, a recording unit 45, and a delay compensation time acquisition unit 46. In other words, the aforementioned recording program causes the control unit 22 to perform at least the communication process, the video data receiving process, the video data transmission process, the buffer update process, the recording process, and the delay compensation time acquisition process. Each of these will be described below.
[0044] The communication unit 41 communicates with, for example, the client computer 72. This communication is used, for example, for the wireless relay device 20 to receive various instructions from the client computer 72. These instructions include, but are not limited to, specifying the camera 71 to view the video, starting / stopping recording, etc. In Figure 1, the camera 71 specified by the user is indicated with an asterisk symbol.
[0045] The video data receiving unit 42 communicates with the camera 71 specified by the user and receives video data based on the camera 71's shooting. The camera 71 encodes the image obtained from the shooting in an appropriate format and generates video data. The encoding standard is arbitrary, but for example, it can be H.264. The video data receiving unit 42 receives the video data in its encoded form.
[0046] The video data transmission unit 43 transmits the video data received by the video data reception unit 42 to the client computer 72 in real time via communication. Before this video data transmission process, the video data is decoded and then re-encoded. The encoding standard is arbitrary, but for example, it can be H.264. The video data transmission unit 43 transmits the encoded video data to the client computer 72.
[0047] The buffer update unit 44 stores the video data received by the video data receiving unit 42 from the camera 71 in the first area 51 of the storage unit 23. The first area 51 can also be called the recording temporary storage area or buffer area. A video can be thought of as a sequence of still images, and each still image that makes up a video is called a frame. After video data has been recorded in the entire first area 51 (after the storage capacity for the first area 51 has been used for the recording), the oldest frame or a frame from a nearby timing is discarded, and the latest frame is recorded in its place. As a result, the first area 51 always stores video data from the most recent predetermined period (the period until the upper limit of the storage capacity of the first area 51 is reached). The amount of data stored depends on the storage capacity for the first area 51, and after a predetermined time has elapsed since storage (longer than the maximum possible value for the delay compensation time described later, for example, a few seconds), the data is sequentially discarded. For this reason, the video data stored in the first area 51 can also be called recording temporary data. As described above, the video data receiving unit 42 performs decoding on the video data received from the camera 71, but encoding is performed again before it is stored in the first area 51.
[0048] The recording unit 45 creates a recording file based on the video data stored in the first area 51, based on instructions from an external instruction device, such as a client computer 72, and stores it in the second area 52 of the storage unit 23. In the storage unit 23, the second area 52 is reserved separately from the first area 51. The recording file consists of encoded video data. The recording process starts based on an instruction to start recording from an external source and ends based on an instruction to stop recording.
[0049] The delay compensation time acquisition unit 46 acquires the delay compensation time by estimating the time until the recording start instruction from the external instruction device is received by the communication unit 41. In the example in Figure 1, the instruction to start recording for the wireless relay device 20 is given by the user operating the client computer 72. When a predetermined operation to instruct the start of recording is performed, the client computer 72 immediately transmits a corresponding signal to the wireless relay device 20. This signal can be called a recording start trigger signal. The recording start trigger signal is an example of a recording start instruction.
[0050] In the example shown in Figure 1, the recording start trigger signal transmitted by the client computer 72 is transmitted over the network, so some time is required for the wireless relay device 20 to receive this signal. Therefore, the timing at which the wireless relay device 20 receives the instruction to start recording is delayed compared to the timing at which the user instructs the user to start recording. The delay compensation time acquisition unit 46 obtains the delay compensation time by estimating this delay time based on the configuration of the communication network, etc. Figure 3 shows the actual timing at which the user instructs the client computer 72 to start recording, the timing at which the wireless relay device 20 receives the recording start trigger signal, and the delay time T. D The relationship between and is shown. Delay compensation time T DC This delay time T D This is the time determined to compensate for the delay. Delay compensation time T DC The delay time is T D Ideally, it should be equal to , but there is an estimation error, so the delay time T D This does not necessarily coincide with the above.
[0051] In the aforementioned recording process, the delay compensation time T is calculated from the time the wireless relay device 20 receives the instruction to start recording. DCThe recording file is generated using a time point in the past or an earlier time point as the start of the time interval for creating the recording data. This allows recording to effectively begin at a time close to when the user instructs the recording to start via the control device.
[0052] As shown in Figure 2, the communication interface 21 provided by the wireless relay device 20 is diverse. In the example in Figure 1, the client computer 72 is connected to the wireless relay device 20 via wireless LAN, but as shown in Figure 2, the client computer 72 can also be connected via wired LAN. Instead of the client computer 72 sending the recording start trigger signal, a communication device 73 connected to the serial communication port of the wireless relay device 20 can also send the recording start trigger signal via serial communication. The communication device 73 can be configured as a known computer. A detection device 74 can also be electrically connected to the GPIO input port, and the signal output by this detection device 74 can be input as the recording start trigger signal. The detection device 74 can be, for example, a switch or a sensor, but is not limited to these. The client computer 72, the communication device 73, and the detection device 74 are all examples of indicator devices.
[0053] The following explanation will focus on the processes performed by the buffer update unit 44 and the recording unit 45, and will refer to the flowchart in Figure 4 for details of the processes performed by the control unit 22. Note that the explanation in Figure 4 assumes that the wireless relay device 20 communicates with a camera 71 designated by the user from among multiple cameras 71 and continuously receives video data based on the camera 71's shooting.
[0054] When processing begins, the recording unit 45 puts itself into a recording stop state (step S101). As described above, the wireless relay device 20 has the function of recording the video from the camera 71 in accordance with an instruction to start recording from an external source. Recording state means the state in which recording is being performed based on an instruction from an external source. Recording stop state means the state in which recording is stopped when there is no instruction to start recording from an external source, or when an instruction to stop recording is received. In other words, it means a state (ready state) in which recording can be started at any time based on an instruction from an external source.
[0055] Next, the video data receiving unit 42 receives video data from the camera 71 (step S102). The control unit 22 decodes the obtained video data, re-encodes it, and stores it in the storage unit 23 (step S103).
[0056] In step S103, video data is stored in the first area 51 of the storage unit 23 as needed. Whether the control unit 22 is in recording mode or recording stopped mode, the video data is stored in the first area 51 (operation of the buffer update unit 44). If the control unit 22 is in recording mode, video data for transmission to the external client computer 72 that sent the instruction to start recording is generated based on the video data stored in the first area 51, and this video data is stored in the second area 52 (operation of the recording unit 45). In either case, each frame constituting the video data is stored with a date and time indicating the imaging timing of that frame substantially associated with it. The processing in steps S102 and S103 is performed as needed.
[0057] On the other hand, the recording unit 45 determines whether or not it is in a recording state (step S104). If it is in a recording-stopped state, the recording unit 45 determines whether or not there is an external instruction to start recording (step S105). In other words, the recording unit 45 determines whether or not the communication unit 41 has received the aforementioned recording start trigger signal. If there is a recording start instruction, the delay compensation time acquisition unit 46 determines the delay time T from when the recording start instruction is given externally until the recording start trigger signal is input to the wireless relay device 20. Dis estimated by calculation (step S106). As a result of this process, the aforementioned delay compensation time T DC can be obtained. Details of the estimation processing in step S106 will be described later.
[0058] The recording unit 45, starting from the timing when the recording start trigger signal is received, the delay compensation time T DC stores the timing just before as the corrected recording start date and time (step S107). As will be described later, the delay compensation time T DC is estimated based on the configuration of the communication means between the recording device and the instruction device, but it may include an error. Therefore, the corrected recording start timing may be further traced back based on the delay compensation time T DC to provide a certain margin. Hereinafter, the timing corresponding to the corrected recording start date and time may be referred to as retroactive timing. Thereafter, the recording unit 45 shifts to a recording state (step S108), and the process returns to step S102.
[0059] In the determination of step S105, if there is no external recording start instruction, the process returns to step S102.
[0060] In the determination of step S104, if the device itself is in a recording state, the recording unit 45 determines whether there is an external recording stop instruction (step S109). If there is no recording stop instruction, the process returns to step S102.
[0061] In the determination of step S109, if there is an external recording stop instruction, the recording unit 45 generates moving image data so as to include frames from the corrected recording start date and time described in step S107 to the present, and stores the moving image data as a recording file in the second area 52 of the storage unit 23 (step S110). Thereafter, the recording unit 45 shifts to a recording stopped state (step S111), and the process returns to step S102.
[0062] Next, the delay compensation time T described in step S106 DC will be described in detail with reference to FIG. 5 and FIG. 6.
[0063] When processing begins, the delay compensation time acquisition unit 46 acquires the delay compensation time T DC Initialize it to zero (step S201).
[0064] Next, the delay compensation time acquisition unit 46 determines whether the recording start trigger signal was input to the wireless relay device 20 via a communication interface from among the network, serial communication, or GPIO (step S202).
[0065] The case where a recording start trigger signal is input via the network means that the client computer 72 and the wireless relay device 20 are connected via the network, and the recording start trigger signal transmitted by the client computer 72 is received by the wireless relay device 20. The network typically refers to a LAN, but it may also be a WAN. The network may be a wired network or a wireless network, but there are differences in how they are handled in the flow described later.
[0066] In this embodiment, the control unit 22 (communication unit 41) of the wireless relay device 20 is provided as an example of a server functioning based on the known HTTP protocol. Correspondingly, the client software executed on the client computer 72 functions as an HTTP client. When a recording start operation is performed on the client computer 72, the client software causes the client computer 72 to access a specific URL of the HTTP server. The communication unit 41 substantially treats this access as a recording start trigger signal. However, the method of instructing the start of recording via communication is not limited to this example.
[0067] When a recording start trigger signal is input via serial communication, it means that the communication device 73 and the wireless relay device 20 are connected via a serial communication cable, and the recording start trigger signal transmitted by the communication device 73 is received by the communication unit 41.
[0068] When a recording start trigger signal is input via GPIO, it means that the detection device 74 is electrically connected to the input port of the GPIO provided by the wireless relay device 20, and the communication unit 41 receives the signal output by the detection device 74 as the recording start trigger signal.
[0069] In step S202, if the recording start trigger signal is input via the network, the delay compensation time acquisition unit 46 determines whether the network to which the client computer 72 is connected is a wireless network (step S203). If the network is wireless, the delay compensation time acquisition unit 46 determines the delay compensation time T DC A predetermined time is added (step S204). In Figure 5, the added time is exemplified as 10 milliseconds, but is not limited to this. Furthermore, the delay compensation time acquisition unit 46 measures the radio wave strength and determines whether it is high, medium, or low (step S205). In this embodiment, RSSI is used as the radio wave strength. RSSI is an abbreviation for Received Signal Strength Indicator. In this embodiment, low radio wave strength is defined as less than -65 dBm, medium radio wave strength as -65 dBm or more and less than -40 dBm, and high radio wave strength as -40 dBm or more, but the division is not limited to this radio wave strength. The delay compensation time acquisition unit 46 determines the delay compensation time T according to the determined stage of radio wave strength. DC A predetermined time is added (steps S206-S208). The time added can be, for example, 10 milliseconds if the radio wave strength is low, 5 milliseconds if it is medium, or 1 millisecond if it is high, as shown in Figure 5, but is not limited to these values.
[0070] If it is determined in step S203 that the network is a wired network, steps S204 to S208 are skipped.
[0071] Next, the delay compensation time acquisition unit 46 determines whether the client computer 72 is connected to the wireless relay device 20 via a mesh network (step S209). In this embodiment, it is possible to construct a network in which multiple wireless relay devices 20 are interconnected, and this network will be referred to as a mesh network below. The mesh network expands the range in which wireless communication is possible. Hereinafter, a connection via a mesh network may be referred to as a mesh connection. An example of a mesh connection is shown in Figure 7. The three wireless relay devices 20, 20A, and 20B shown in Figure 7 all have substantially the same configuration. Wireless relay device 20A is wirelessly connected to wireless relay device 20, and wireless relay device 20B is wirelessly connected to wireless relay device 20A. The client computer 72 is wirelessly connected to wireless relay device 20B and instructs the wireless relay device 20 to which the camera 71 to be viewed is connected to start and stop recording. When a mesh connection is used, the delay compensation time acquisition unit 46 determines the delay compensation time T DC A predetermined time is added (step S210). The time to be added can be arbitrarily determined, but for example, it can be the number of hops multiplied by 10 milliseconds. The number of hops refers to the number of devices that relay the data transmitted by the client computer 72 to reach the device (wireless relay device 20). In the example in Figure 7, the number of hops is 2.
[0072] Next, the delay compensation time acquisition unit 46 determines whether the client computer 72 is connected to the wireless relay device 20 via a wireless slave unit (step S211). The client computer 72 can connect to the wireless relay device 20 via one or more pre-installed wireless slave units. An example of the use of a wireless slave unit is shown in Figure 8. The wireless slave unit 75 can be configured, for example, as a wireless LAN access point. By using the wireless slave unit 75, the range of wireless communication can be expanded. If a connection is made via the wireless slave unit 75, the delay compensation time acquisition unit 46 determines the delay compensation time T DCA predetermined time is added (step S212). The time to be added can be arbitrarily determined, but for example, as shown in Figure 5, it can be the number of wireless slave units 75 that relay the data multiplied by 10 milliseconds.
[0073] The processing in steps S203 to S212 is performed with the above delay time T, assuming the client computer 72 is connected to the network. D This can be described as a process for estimating the delay compensation time T obtained by this process. The delay compensation time acquisition unit 46 then processes the delay compensation time T obtained by this process. DC It returns the result of the calculation.
[0074] If, in step S202, a recording start trigger signal is input via serial communication, the delay compensation time acquisition unit 46 determines the speed of serial communication with the client computer 72 (step S213 in Figure 6). The value of the serial communication speed expressed in bits per second is sometimes called the baud rate. The delay compensation time acquisition unit 46 determines the delay compensation time T according to the determined serial communication speed. DC A predetermined time is added (steps S214 to S217). The time added can be, for example, 1 millisecond if the baud rate is 115200, 2 milliseconds if it is 57600, 3 milliseconds if it is 19200, and 4 milliseconds if it is 9600 or less, but is not limited to these.
[0075] Next, the delay compensation time acquisition unit 46 determines the data bit length of the serial communication (step S218). The data bits correspond to the content of the data transmitted and received between the client computer 72 and the wireless relay device 20. In serial communication, a bit sequence is transmitted and received in units of a predetermined data bit length. The data bit length can be selected from 7 bits or 8 bits. The delay compensation time acquisition unit 46 determines the delay compensation time T according to the determined data bit length. DC A predetermined time is added (steps S219, S220). The time added may be, for example, 2 milliseconds if the data bit length is 8, or 1 millisecond if it is 7, but is not limited to these.
[0076] Next, the delay compensation time acquisition unit 46 determines whether or not there is a parity bit in the serial communication (step S221). A parity bit is a bit added to the data bits to improve the reliability of the communication, but communication without a parity bit is also possible. Depending on whether or not there is a parity bit, the delay compensation time acquisition unit 46 determines the delay compensation time T DC A predetermined time is added (steps S222, S223). The time added may be, for example, 2 milliseconds if there is a parity bit, or 1 millisecond if there is no parity bit, but is not limited to this.
[0077] Next, the delay compensation time acquisition unit 46 determines the stop bit length (step S223). In serial communication, bit sequences are transmitted and received in units of the above-mentioned data bit length, but for each unit, a start bit is added to the beginning and a stop bit to the end. The start bit length is fixed at 1 bit, but the length of the stop bit can be selected from 1 bit or 2 bits. The delay compensation time acquisition unit 46 determines the delay compensation time T according to the determined stop bit length. DC A predetermined time is added (steps S225, S226). The time added can be, for example, 2 milliseconds if the stop bit length is 2, and 1 millisecond if it is 1, but is not limited to these.
[0078] The processing in steps S213 to S226 is performed when the communication device 73 is connected in a serial communication manner, and the above delay time T D This can be described as a process for estimating the delay compensation time T obtained by this process. The delay compensation time acquisition unit 46 then processes the delay compensation time T obtained by this process. DC It returns the result of the calculation.
[0079] In step S202 of Figure 5, if a recording start trigger signal is input via GPIO, the delay compensation time acquisition unit 46 will use the initialized delay compensation time T DC The calculation returns the following result: This is the delay time T when the detection device 74 is connected via GPIO. D This means that it is estimated to be zero.
[0080] According to the flow charts shown in Figures 5 and 6, the delay compensation time T is determined according to the communication interface used for inputting the recording start trigger signal to the wireless relay device 20. DC This allows for the appropriate determination.
[0081] Next, we will discuss the first frame included in the recording file.
[0082] The recording file generated in step S110 of Figure 4 includes temporary recording data that was stored in the first area 51 of the storage unit 23 at the time before the wireless relay device 20 received the recording start trigger signal.
[0083] As mentioned above, the first region 51 stores the recorded temporary data in an encoded form. In this encoding process, a known method called inter-frame prediction is used. In inter-frame prediction, all frames included in the video are classified into either I-frames, P-frames, or B-frames. An I-frame is a frame in which the complete image is described in the data, and is set to appear at appropriate intervals in the video data. The interval in which I-frames appear is arbitrary, but for example, it can be about 1000 milliseconds in terms of time interval. A P-frame is a frame in which only the difference that has changed from the previous frame is described in the data. A B-frame is a frame in which only the difference that has changed from the preceding or following frame is described in the data.
[0084] In this embodiment, the encoded frames stored in the first region 51 are substantially copied to the portion of the recorded file prior to the timing of receiving the recording start trigger signal. This simple copy process simplifies the recording file generation process. The first frame included in the recorded file is, in principle, the frame corresponding to the corrected recording start date and time (retroactive timing) described in step S107. However, if the frame stored in the first region 51 is a P frame or a B frame, and this frame is assumed to be the first frame of the recorded file, the video cannot be displayed correctly during playback because there is no frame to reference for the difference. Therefore, when the process in step S110 is performed, the recording unit 45, as shown in Figure 9, further corrects the corrected recording start date and time so that it goes back to the timing when the first I frame appears if the frame of the corrected recording start date and time is a P frame or a B frame. This allows the recording file to be generated so that the first frame is an I frame, and subsequent P frames and B frames can be displayed correctly.
[0085] As described above, the wireless relay device 20 of this embodiment comprises a communication unit 41, a video data receiving unit 42, and a recording unit 45. The communication unit 41 communicates with an instruction device (in the example of Figure 1, a client computer 72). The video data receiving unit 42 receives video data acquired by the camera 71. The recording unit 45 creates recording data when it receives a recording start trigger signal from the client computer 72, which is an instruction to start creating recording data based on the video data. The start of the time interval in which the recording unit 45 creates recording data is determined by a delay compensation time T from the timing when the communication unit 41 receives the recording start trigger signal, according to the configuration of the communication means between the client computer 72 and the communication unit 41. DC It is determined based on retroactive timing, which is a point in time that goes back only a little further.
[0086] As a result, even if the time it takes for a recording start instruction to reach the wireless relay device 20 from the instruction device (for example, the client computer 72) changes depending on the configuration of the communication means between the wireless relay device 20 and the instruction device, the system can flexibly respond to this change and effectively start recording at a time close to when the recording start instruction is actually given to the client computer 72.
[0087] The wireless relay device 20 of this embodiment includes a storage unit 23 that stores temporary recording data based on video data for the most recent period before receiving a recording start trigger signal. The recording unit 45 generates the portion of the recording data prior to the timing of receiving the recording start trigger signal based on the temporary recording data.
[0088] This allows us to appropriately obtain the portion of the recorded data prior to the reception of the recording start trigger signal, based on the temporary recording data.
[0089] In the wireless relay device 20 of this embodiment, the delay compensation time T DC This is determined differently depending on whether there is a wireless relay device 20A, 20B or a wireless slave device 75 interposed between the client computer 72 and the wireless relay device 20 (steps S209 to S212).
[0090] When a wireless relay device 20A, 20B, or wireless slave unit 75 is interposed between the client computer 72 and the wireless relay device 20, the communication time between them increases. The delay compensation time T depends on whether or not a communication device is intervening. DC Once this is determined, in any case, recording can effectively begin at a time close to the time when the instruction to start recording is actually given to the client computer 72.
[0091] In the wireless relay device 20 of this embodiment, multiple wireless relay devices 20A, 20B, or wireless slave units 75 can be interposed between the client computer 72 and the wireless relay device 20. Delay compensation time T DCThis is determined differently depending on the number of wireless relay devices 20A, 20B, or wireless slave units 75 interposed between the client computer 72 and the wireless relay device 20 (steps S209 to S212).
[0092] Regardless of the number of intervening communication devices, the delay compensation time T is calculated according to that number. DC This determination allows recording to effectively begin at a time close to when the instruction to start recording was actually given to the client computer 72.
[0093] In this embodiment, the wireless relay device 20 includes a plurality of communication interfaces 31 to 34. The communication interfaces 31 to 34 include wireless communication, serial communication, and GPIO communication. Delay compensation time T DC The recording start trigger is determined differently depending on the communication interface to which it is input (steps S202-S226).
[0094] In this embodiment, the client computer 72, the communication device 73, and the detection device 74 all function as instruction devices. If the communication interface between the instruction device and the wireless relay device 20 is different, the communication time between them will change. The delay compensation time T will vary depending on the communication interface. DC Once this is determined, in any case, recording can effectively begin at a time close to the time when the instruction to start recording is actually given to the client computer 72.
[0095] In this embodiment, the delay compensation time T DC This is determined based on the estimated communication time between the client computer 72, etc., and the wireless relay device 20, which is determined based on the configuration of the communication means.
[0096] This makes it possible to determine, with relatively simple processing, when recording should actually begin.
[0097] In this embodiment, the recording temporary data is encoded using a method employing inter-frame prediction and stored in the first area 51 of the storage unit 23. If the frame corresponding to the corrected recording start date and time (retroactive timing) in the recording temporary data is not an I-frame in the inter-frame prediction, the start of the time interval of the recording file is set to a timing earlier than the retroactive timing and corresponding to the I-frame in the recording temporary data.
[0098] This allows temporary recording data to be used as part of the recording file without decoding and re-encoding it. Therefore, the load on the recording process can be reduced. In addition, since the first frame of the recording data becomes an I-frame, the frame at the beginning of the time interval can be displayed correctly when playing back the recording data.
[0099] Next, a modified example of actually measuring the time required for communication between the client computer 72 and the wireless relay device 20 when the client computer 72 and the wireless relay device 20 are connected via a network will be explained with reference to the flowchart in Figure 10.
[0100] The process shown in Figure 10 is executed repeatedly at predetermined intervals. When the flow in Figure 10 starts, the delay compensation time acquisition unit 46 determines whether or not there is a client computer 72 connected to the wireless relay device 20 via the network (step S301). If there is no client computer 72, the series of processes is terminated.
[0101] If there is a client computer 72 connected to the wireless relay device 20, the communication unit 41 measures the RTT for communication with the client computer 72 (step S302). RTT is an abbreviation for Round Trip Time. RTT is the time from when the wireless relay device 20 sends a signal to the client computer 72 until the wireless relay device 20 receives a response signal from the client computer 72. The method of measuring RTT is arbitrary, but in this modified example, it is done based on the well-known ICMP. ICMP is an abbreviation for Internet Control Message Protocol. In order to realize RTT measurement using ICMP, the communication unit 41 has the function of an ICMP client.
[0102] Once the RTT is obtained, the delay compensation time acquisition unit 46 calculates the delay compensation time T based on the RTT. DC The value is calculated and stored in the memory unit 23 (step S303). Delay compensation time T DC This is calculated as half the round-time time (RTT). After that, the series of processes is terminated.
[0103] The process shown in Figure 10 is performed periodically, which determines the delay compensation time T to be applied between the client computer 72 and the wireless relay device 20. DC It can store the latest value for that.
[0104] In a modified version of this embodiment, the delay compensation time T is calculated in steps S203 to S212 of Figure 5. DC Instead of calculating the latest delay compensation time T obtained in the flow of Figure 10, DC This is referenced. In step S107 of Figure 4, this delay compensation time T DC The timing calculated by going back from the present is stored as the corrected recording start date and time. In this modified version, by determining the start of the recording file's time interval based on the actually measured RTT, recording can be effectively started at a time closer to the actual time when recording was instructed to start.
[0105] As explained above, in the modified wireless relay device 20, the delay compensation time T DC This is determined based on the communication time between the client computer 72 and the wireless relay device 20, measured under the application of the communication means.
[0106] This allows recording to effectively begin at a time closer to the actual timing when the instruction to start recording was given, based on the measured communication time.
[0107] In the above configuration, the recording unit 45 determines whether or not a recording stop command has been issued in steps S109 to S111 of Figure 4 (step S109) based on whether or not there is an external command to stop recording. As an alternative modification, for example, the recording unit 45 may determine whether or not to stop recording based on whether or not a predetermined time has elapsed after an external command to start recording. In other words, the recording unit 45 can be configured so that the user can pre-set how many minutes or seconds have elapsed since the communication unit 41 received the recording start trigger signal before recording automatically stops. In this case, the recording unit 45 stops recording after the time set by the user has elapsed.
[0108] Preferred embodiments and modifications of the present invention have been described above, but the above configuration can be modified as follows, for example. Modifications may be made individually, or multiple modifications may be made in any combination.
[0109] The user has a delay compensation time T for each communication interface. DC It is also possible to configure it so that it can be set arbitrarily.
[0110] The communication path between the wireless relay device 20 and the client computer 72 may be configured such that only one other communication device can be intervened, or it may be configured such that no other communication devices can be intervened at all.
[0111] In the wireless relay device 20, one or more of the wireless LAN communication interface 31, wired LAN communication interface 32, serial communication interface 33, and GPIO interface 34 may be omitted. A different communication interface may also be used.
[0112] Delay compensation time T DC This is the actual delay time T. D The recording time can be determined by adding an appropriate margin to intentionally make it longer than the stated time. This ensures that the recording file is generated in a way that includes frames corresponding to the actual timing when recording was instructed to begin. The retrospective timing of the I-frame, as explained in Figure 9, can also be considered a type of margin.
[0113] In the example in Figure 9, instead of advancing the start of the recording file's time interval until the I-frame appears, it is also possible to modify it to delay the start of the time interval until the I-frame appears.
[0114] When including the temporary recording data stored in the first area 51 of the memory unit 23 into a recording file, decoding and re-encoding processes may be performed.
[0115] Recorded data can also be saved in formats other than files. For example, a database table can be built in the storage unit 23, and the recorded data can be saved as stream data. [Explanation of Symbols]
[0116] 20 Wireless relay device (recording device) 21 Communication Interface 22 Control Unit 23 Memory section 41 Communications Department 42 Video data receiving unit 45 Recording Section 71. Camera (imaging device) 72. Client computer (instruction device) 73 Communication device (instruction device) 74. Detection device (indicator device)
Claims
1. A communication unit for communicating with the instruction device, A video data receiving unit that receives video data acquired by the imaging device, When a recording start instruction is received from the instruction device, which is an instruction to start creating recorded data based on the aforementioned video data, the recording unit creates the recorded data, Equipped with, The recording device is characterized in that the start time of the time interval in which the recording unit creates the recording data is determined based on a retrospective timing, which is a timing that is set back by a delay compensation time determined according to the configuration of the communication means between the instruction device and the communication unit from the timing at which the communication unit receives the recording start instruction.
2. A recording device according to claim 1, The system includes a storage unit that stores temporary recording data based on the video data for the most recent period before receiving the recording start instruction, The recording device is characterized in that the recording unit generates the portion of the recording data prior to the timing of receiving the recording start instruction based on the temporary recording data.
3. A recording device according to claim 1, The recording device is characterized in that the delay compensation time is determined differently depending on whether or not there is a communication device interposed between the instruction device and the recording device.
4. A recording device according to claim 3, Multiple communication devices can be interposed between the instruction device and the recording device. The recording device is characterized in that the delay compensation time is determined to differ depending on the number of communication devices interposed between the instruction device and the recording device.
5. A recording device according to claim 1, Equipped with multiple communication interfaces, The aforementioned communication interface includes at least one of wireless communication, serial communication, and GPIO communication. The recording device is characterized in that the delay compensation time is determined differently depending on the communication interface from which the recording start instruction is input.
6. A recording device according to claim 1, The recording device is characterized in that the delay compensation time is determined based on the communication time between the instruction device and the recording device, which is estimated based on the configuration of the communication means.
7. A recording device according to claim 1, The recording device is characterized in that the delay compensation time is determined based on the communication time between the instruction device and the recording device, as measured under the application of the communication means.
8. A recording device according to claim 2, The aforementioned recording temporary data is encoded and stored using a method employing inter-frame prediction. A recording device characterized in that, if the frame corresponding to the retrospective timing in the aforementioned temporary recording data is not an I-frame in the inter-frame prediction, the start of the time interval is set to a timing earlier than the retrospective timing and to a timing corresponding to the I-frame in the temporary recording data.
9. A recording method performed in a recording device, A video data reception process in which the imaging device receives video data acquired by the imaging device, When a recording start instruction is received from the instruction device, which is an instruction to start creating recorded data based on the aforementioned video data, a recording process is performed to create the aforementioned recorded data. Includes, A recording method characterized in that, in the recording step, the start time of the time interval in which the recording data is created is determined based on a retrospective timing, which is a timing that is set back by a delay compensation time determined according to the configuration of the communication means between the instruction device and the recording device from the timing at which the recording device receives the recording start instruction.
10. A recording program for operating a recording device that receives video data transmitted from an imaging device that acquires video data, The recording device is capable of communicating with the instruction device. The aforementioned recording program is A video data receiving step in which the imaging device receives video data acquired by the imaging device, When a recording start instruction is received from the instruction device, which is an instruction to start creating recorded data based on the aforementioned video data, a recording process is performed to create the recorded data. The recording device is instructed to perform this action. A recording program characterized in that, in the recording process, the start time of the time interval in which the recording device creates the recording data is determined based on a retrospective timing, which is a timing that is set back by a delay compensation time determined according to the configuration of the communication means between the instruction device and the recording device from the timing at which the recording device receives the recording start instruction.
Citation Information
Patent Citations
Imaging system, imaging apparatus, imaging method and program
JP2013175819A