Apparatus, method and electronic device for updating video composition

The video configuration updating device automatically adjusts camera settings by detecting scene changes through optical flow analysis, ensuring accurate surveillance without manual intervention.

JP7567206B2Active Publication Date: 2024-10-16FUJITSU LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2020092420
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-06-14
Filing Date
2020-05-27
Publication Date
2024-10-16
Estimated Expiration
2040-05-27

AI Technical Summary

Technical Problem

The viewing angle of cameras in video surveillance systems, such as PTZ cameras, can become misaligned due to external forces, leading to changes in the captured scene, necessitating manual resetting of video configuration to maintain accuracy.

Method used

A video configuration updating device and method that performs optical flow calculation on feature points of multiple frames to detect scene changes, calculates the degree of matching between current and predetermined images, and updates the configuration to the closest matching image.

Benefits of technology

Automatically updates video configurations without requiring control signals, integrating seamlessly with event analysis and ensuring accurate scene capture even in unmanned scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007567206000004
    Figure 0007567206000004
  • Figure 0007567206000005
    Figure 0007567206000005
  • Figure 0007567206000006
    Figure 0007567206000006
Patent Text Reader

Abstract

To provide a video configuration updating device, a method, and electronic equipment.SOLUTION: A method includes the steps of: detecting whether or not the video shooting scene has changed by performing an optical flow calculation based on a plurality of feature points of the frame in video images; when the scene has changed, acquiring matching images closest to the current scene by calculating the matching degree between the current frame and a plurality of predicted images on each block; and updating the video shooting configuration to a configuration corresponding to the closest matching image.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] FIELD OF THE DISCLOSURE The present invention relates to the technical field of video surveillance. [Background technology]

[0002] Video surveillance systems are widely used in daily life, for example, cameras can detect various traffic accidents. In order to detect events, configuration information of video shooting, such as lane areas, lane directions, lane boundaries, etc. (hereinafter referred to as video configuration) needs to be set in advance.

[0003] It should be noted that the above description of the technical background is for the purpose of making the technical solutions of the present invention clear and complete, and is described for the purpose of making those skilled in the art understand. These technical solutions are merely described as part of the background technology of the present invention, and are not well known to those skilled in the art. Summary of the Invention [Problem to be solved by the invention]

[0004] According to the discovery of the present inventors, since the viewing angle of the camera is limited, the camera (e.g., PTZ camera) in the field of video surveillance may shift (e.g., translate or rotate) due to external forces, etc., which may cause the captured scene to change. When the camera shifts, the video configuration needs to be reset to ensure the accuracy of the video surveillance.

[0005] In view of at least one of the above technical problems, embodiments of the present invention provide an apparatus, method and electronic device for updating a video composition. [Means for solving the problem]

[0006] In a first aspect of an embodiment of the present invention, there is provided a video configuration updating device, the device including: a scene detection unit that performs optical flow calculation based on feature points of multiple frames in a video image to detect whether the scene of the video shooting has changed; an image matching unit that, when the scene has changed, calculates the matching degree between the current frame and multiple specified images for each block and obtains a matching image that is closest to the current scene; and a configuration updating unit that updates the configuration of the video shooting to a configuration corresponding to the closest matching image.

[0007] In a second aspect of an embodiment of the present invention, a method for updating a video configuration is provided, the method including the steps of: performing optical flow calculation based on feature points of multiple frames in a video image to detect whether a scene in a video shot has changed; if the scene has changed, calculating the matching degree between the current frame and multiple specified images for each block, respectively, to obtain a matching image that is closest to the current scene; and updating the configuration of the video shot to a configuration corresponding to the closest matching image.

[0008] In a third aspect of an embodiment of the present invention, there is provided an electronic device including a memory in which a computer program is stored and a processor, wherein the processor executes the steps of: performing optical flow calculations based on feature points of multiple frames in a video image to detect whether the scene of the videotape has changed; if the scene has changed, calculating the degree of matching between the current frame and multiple specified images for each block, and obtaining a matching image that is closest to the current scene; and updating the configuration of the videotape to a configuration corresponding to the closest matching image.

[0009] The advantageous effects of the embodiment of the present invention are as follows: Perform optical flow calculation according to the feature points of multiple frames in a video image to detect whether the scene of the video shooting has changed, and if the scene has changed, respectively calculate the matching degree between the current frame and multiple predetermined images for each block, obtain the closest matching image to the current scene, and update the configuration of the video shooting to the configuration corresponding to the closest matching image, so that the video configuration update can be realized by using the video signal without the need to process the control signal, and the configuration update can be easily integrated into the event analysis.

[0010] Certain embodiments of the invention are disclosed in detail, as set forth in the following description and in the drawings, which show how the principles of the invention may be employed, but are not intended to be limited in scope, and all such modifications, alterations, and equivalents are within the spirit and content of the appended claims.

[0011] Features described and / or shown in one embodiment may be used in the same or similar manner in one or more other embodiments, may be combined with features in the other embodiments, or may substitute for features in the other embodiments.

[0012] It should be noted that the term "comprising" when used in the present text means the presence of a feature, element, step or component and does not exclude the presence or addition of one or more other features, elements, steps or components. [Brief description of the drawings]

[0013] The drawings included herein are for understanding the embodiments of the present invention, constitute a part of this specification, and are for illustrating the embodiments of the present invention, and together with the description of the text, explain the principles of the present invention. Note that the drawings described herein are merely for illustrating the embodiments of the present invention, and those skilled in the art can easily obtain other drawings based on these drawings. [Figure 1]FIG. 2 illustrates a method for updating a video configuration according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram showing an example of the state of a classification point in an embodiment of the present invention. [Diagram 3] FIG. 11 is a diagram showing another example of the state of classification points in an embodiment of the present invention. [Figure 4] FIG. 2 is a diagram showing an example of a predetermined image according to an embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram showing an example of matching a current image with a predetermined image in an embodiment of the present invention. [Figure 6] FIG. 11 is a diagram showing another example of a predetermined image according to the embodiment of the present invention. [Figure 7] FIG. 11 is a diagram showing another example of matching a current image with a predetermined image in an embodiment of the present invention. [Figure 8] FIG. 2 illustrates an example of sampling, filtering and selection of matching images in an embodiment of the present invention. [Figure 9] 11A and 11B are diagrams illustrating an example of misalignment correction according to an embodiment of the present invention. [Figure 10] FIG. 2 illustrates a video surveillance process of an embodiment of the present invention. [Figure 11] FIG. 2 illustrates an apparatus for updating a video composition according to an embodiment of the present invention. [Figure 12] FIG. 2 is a diagram illustrating a scene detection unit according to an embodiment of the present invention. [Figure 13] 1 is a diagram showing an electronic device according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] The above and other features of the present invention will become apparent from the drawings and the following description. The specification and drawings disclose specific embodiments of the present invention, i.e., some embodiments according to the principles of the present invention. It is to be understood that the present invention is not limited to the described embodiments, and the present invention includes all modifications, variations, and equivalents within the scope of the appended claims.

[0015] In the embodiments of the present invention, the terms "first" and "second" are used to distinguish different elements by name and do not imply the spatial arrangement or temporal order of these elements, and the elements are not limited to these terms. The term "and / or" includes any one or more of the listed terms and combinations thereof. The terms "including," "including," and "having" refer to the presence of stated features, elements, components or members but do not exclude the presence or addition of one or more other features, elements, components or members.

[0016] In the present embodiment, the singular forms "a", "the", "the" and the like include the plural, meaning "a kind" or "a class", and are not limited to "one". Additionally, the term "said" includes both the singular and the plural, unless the context clearly dictates otherwise. Additionally, the term "according to" means "at least in part depending on" and the term "based on" means "at least in part based on", unless the context clearly dictates otherwise.

[0017] In the embodiment of the present invention, a traffic event and traffic monitoring are taken as an example to describe the traffic event and traffic monitoring, and a video image including multiple frames may be obtained by a camera, which may be a PTZ camera for video monitoring of intelligent transportation, and continuously captures the monitoring area. The present invention is not limited thereto, and may be applied to other video monitoring scenes, such as a parking lot video monitoring scene, a security video monitoring scene, etc. The following takes a traffic video monitoring scene as an example to describe the traffic event and traffic monitoring.

[0018] <First Example> An embodiment of the present invention provides a video composition updating method. Figure 1 is a diagram showing the video composition updating method of the embodiment of the present invention. As shown in Figure 1, the method includes the following steps:

[0019] Step 101: Perform optical flow calculation based on feature points of multiple frames in a video image to detect whether the scene of the video has changed.

[0020] Step 102: If the scene has changed, calculate the matching degree between the current frame and multiple predetermined images for each block, and obtain the matching image that is closest to the current scene.

[0021] Step 103: Update the video capture configuration to the configuration corresponding to the closest matching image.

[0022] In the embodiment of the present invention, there is no need to process control signals, and video configuration updates can be realized using video signals, and configuration updates can be easily integrated into event analysis. Moreover, even in an unmanned environment, scene detection and image matching can be realized automatically, so that configuration updates can be performed automatically without the need for human intervention.

[0023] It should be noted that Fig. 1 is merely for illustrative purposes of an embodiment of the present invention, and the present invention is not limited thereto. For example, the execution order of each process may be adjusted as appropriate, other processes may be added, or some processes may be deleted. Those skilled in the art may make appropriate modifications based on the above content, and are not limited to the description of Fig. 1 above.

[0024] In one embodiment, the scene detection (which may also be referred to as scene change detection) in step 101 includes the steps of selecting a reference frame from a video image and extracting a plurality of feature points from the reference frame; selecting feature points of a background region (or a relatively still region) in the video image from the plurality of feature points by optical flow calculation; classifying the feature points by optical flow calculation, calculating a scene change rate based on the number of feature points after classification, and determining whether the scene has changed based on the scene change rate.

[0025] For example, scene changes may be detected using feature points and optical flow calculations. Scene detection may be part of pre-processing and scene detection may be called once every N frames. Scene detection may include three stages, namely initialization stage, selection stage, and detection stage (or decision stage), and may be performed in any one or more of the above stages. For example, in one call of scene detection, the detection stage may be entered after the initialization stage and selection stage are completed, or the detection stage may be entered directly without a trigger condition.

[0026] In order to reduce the amount of calculation, the image for scene detection may be converted into a grayscale image (w×h) and scaled to αw×αh (0<α≦1). When the first frame is received or the initialization flag is set to true, scene detection is initialized.

[0027] In the initialization phase, a current frame (e.g., the first frame) may be selected as a reference frame. Then, feature points may be extracted from the reference frame. The feature points may be Shi-Tomasi corner points, Harris corner points, or other feature points, and the present invention is not limited thereto. If the number of feature points is insufficient (e.g., less than a predefined threshold), the scene detection will be reinitialized in the next call. If the scene detection is successfully initialized, the initialization flag is set to false.

[0028] The selection step may be called multiple times in succession, and the optical flow of the feature points is computed each time. The optical flow of the feature points in the background region may be used to detect scene changes. However, feature points may occur in the foreground region of the reference frame (e.g., moving objects), so these feature points need to be filtered out.

[0029] In one embodiment, a score of the feature point may be calculated, and whether the feature point is a feature point of a background region in a video image may be determined based on the score. For example, the score of the feature point may be calculated based on at least one of the following conditions: whether a corresponding point in the current frame is obtained by optical flow calculation, whether an error in optical flow calculation is greater than a first threshold, and whether a distance between the feature point in the reference frame and the corresponding point in the current frame is greater than a second threshold.

[0030] For example, a score M may be preset for each feature point, and 1 point may be subtracted from the score if a corresponding point in the current frame is not obtained by optical flow calculation, if the error in the optical flow calculation is greater than T1, or if the distance between a feature point in the reference frame and a corresponding point in the current frame is greater than a second threshold T2.

[0031] After M optical flow calculations, a set of feature points with score T M Then, we filter out points smaller than . If the number of remaining feature points is not enough, we may set the initialization flag to true, which means the PTZ camera is rotating or there are many moving objects occluding the background region.

[0032] In addition, the extraction of feature points and the calculation of optical flow may refer to related art, and detailed description thereof will be omitted in this specification. In addition, the method of acquiring the error of the optical flow calculation and the method of calculating the distance between frames may refer to related art. In addition, the specific value of the above threshold value may be determined according to actual conditions and empirical values, and the embodiment of the present invention is not limited thereto.

[0033] In the detection stage, the optical flow amount of the feature points may be calculated and the feature points may be classified according to a predetermined rule, for example, the points are classified into four types, namely, the first type points (missing points), the second type points (good points), the third type points (unstable points) and the fourth type points (bad points).

[0034] For example, when classifying a feature point, if a corresponding point in the current frame is not obtained by optical flow calculation, the feature point may be classified as a first class point; and / or if an error in optical flow calculation is smaller than a third threshold (T3), the feature point may be classified as a second class point; and / or if an error in optical flow calculation is equal to or larger than the third threshold (T3) and the distance between the feature point in the reference frame and the corresponding point in the current frame is smaller than a fourth threshold (T4), the feature point may be classified as a third class point; and / or if an error in optical flow calculation is equal to or larger than the third threshold (T3) and the distance between the feature point in the reference frame and the corresponding point in the current frame is equal to or larger than the fourth threshold (T4), the feature point may be classified as a fourth class point.

[0035] Also, for example, the scene change rate may be calculated according to the following formula:

[0036] R sc =(N4+N1) / (N1+N2+N3+N4) Here, N1 is the number of first class points (N not ), and N2 is the number of second class points (N good ), and N3 is the number of third class points (N unstable ), and N4 is the number of the fourth class points (N bad (which may also be expressed as

[0037] 2 is a diagram showing an example of the state of classification points in an embodiment of the present invention, showing the number of feature points, optical flow (represented by line segments between points), and classification points. As shown in FIG. 2, for example, if the number of good points (goodPts) is 49, the number of unstable points (unstablePts) is 8, the number of bad points (badPts) is 2, and the number of notfound points (notfoundPts) is 0, the calculated scene change rate (errRate) is 0.033898, which is lower than the threshold (Threshold) 0.5, so it may be determined that the scene has not changed.

[0038] 3 is a diagram showing another example of the state of classification points in an embodiment of the present invention, showing the number of feature points, optical flow (represented by line segments between points), and classification points. As shown in FIG. 3, for example, if the number of good points (goodPts) is 2, the number of unstable points (unstablePts) is 6, the number of bad points (badPts) is 50, and the number of not found points (notfoundPts) is 1, the calculated scene change rate (errRate) is 0.864407, which is higher than the threshold (Threshold) 0.5, so it may be determined that the scene has changed.

[0039] It should be noted that the above description is merely an example of the above conditions and classification points, but the present invention is not limited thereto. For example, other conditions and classification methods may be used, and the types of classification points are not limited to four types, and other specific conditions may be determined according to the scene.

[0040] In one embodiment, a first count is made for scene changes based on the scene change rate and / or the number of feature points, and the scene is determined to have changed if the first count increases to a fifth threshold (T5).

[0041] For example, a scene change counter may be set to make scene detection more stable and reduce false detections caused by environmental noise. sc is the threshold T sc If the scene change rate R is greater than 1, the scene change counter is incremented by 1. sc is the threshold T sc If it is less than T5, set the scene change counter to 0. If the scene change counter reaches T5, set the scene change flag to true and determine that the scene has changed.

[0042] Also, for example, to make scene detection more stable, the number of feature points may be used as a condition. For example, the sum of good points and unstable points may be checked, and N good +N unstable is the threshold T good+unstable If it is less than, add 1 to the scene change counter.

[0043] In one embodiment, the scene detection may perform a second count for the scene change delay, and the scene detection may be initialized when the second count decreases to zero, thereby ensuring that the configuration update occurs after the camera stops rolling.

[0044] For example, a scene change delay counter is set and an initial value is preset to D. Each time scene detection is performed, 1 is subtracted from the scene change delay counter. When the scene change delay counter is decremented to zero, the initialization flag is set to true and the scene change flag is set to false.

[0045] The above describes an exemplary process of scene detection in step 101, and the following describes image matching in step 102.

[0046] For example, when a change in the PTZ camera's scene is detected, the previous video configuration is not suitable for the current position, so the current position needs to be matched with a predetermined position after the camera stops rotating. Several possible predetermined positions and corresponding video configurations may be set for one PTZ camera, and images at the predetermined positions (predetermined images) may be saved for predetermined matching. The video configurations vary according to the required traffic events, e.g., lane position and direction need to be set for reverse detection function.

[0047] In one embodiment, a template matching method may be used. For example, if the matching range is W×H, the blob template may be w×h, and the grayscale image of each blob may be taken as the template. The matching function is slid over the background image of W×H, and the overlapping blocks of w×h are compared, and the comparison result is stored in a matrix, and the size of the result matrix is ​​(W-w+1)×(H-h+1).

[0048] Alternatively, template matching may be performed using a normalized correlation coefficient method, for example, according to the following equation (1):

number

[0049] I represents the input image, T is the template, and R is the result matrix. Before calculating the similarity, the image and template are normalized to avoid errors caused by changes in light illumination. The value of R ranges from -1 to 1, where 1 represents the image and template are identical, -1 represents the inverse, and 0 represents no linear relationship.

[0050] In one embodiment, the current frame (current image) and a given image are divided into multiple blocks (e.g., 9 blocks), and a template matching method is applied to each block: a block in the given image is taken as a template, the range of the corresponding block in the current image is extended, and the extended block is taken as the input image.

[0051] Fig. 4 is a diagram showing an example of a predetermined image in an embodiment of the present invention, in which the predetermined image 1 is divided into nine blocks. Fig. 5 is a diagram showing an example of matching between a current image and a predetermined image in an embodiment of the present invention, in which the predetermined image 1 is matched with the current image. As shown in Figs. 4 and 5, the grid indicated by 401 represents a block, and the grid indicated by 501 represents an extension range of template matching.

[0052] Fig. 6 is a diagram showing another example of a predetermined image in an embodiment of the present invention, in which the predetermined image 2 is divided into nine blocks. Fig. 7 is a diagram showing another example of matching between a current image and a predetermined image in an embodiment of the present invention, in which the predetermined image 2 is matched with the current image. As shown in Figs. 6 and 7, the grid indicated by 601 represents a block, and the grid indicated by 701 represents an extension range of template matching.

[0053] As shown in Figures 4 to 7, a template matching method may be used to calculate the matching degree between the template block image and the input block image, and a matching score for each block may be obtained. For example, 9 blocks have 9 matching degrees. Figures 5 and 7 show the matching degrees of each block, respectively.

[0054] For example, the block may cover a foreground object, resulting in a low matching degree. Therefore, the matching degrees may be sorted, outliers may be removed, and the average of the remaining values ​​may be calculated. The average is regarded as the matching score between the current image and the predetermined image. After matching the current image with each predetermined image, the predetermined image with the highest matching score may be selected as the matching result. Then, the video composition of the matched predetermined image may be updated.

[0055] For example, the final matching score of the predetermined image 1 in Fig. 5 is 0.916, and the matching score of the predetermined image 2 in Fig. 7 is 0.169. Therefore, the predetermined image 1 is the image that best matches the current image, and its video composition is updated to the buffer for subsequent event detection.

[0056] Image matching has been described above as an example, and deviation correction and shake correction will be described below.

[0057] In one embodiment, an optical flow calculation is performed based on the sampling points in the matching image, a misalignment between the current frame and the matching image is detected, and a misalignment correction is performed on the video image based on the misalignment detection result.

[0058] For example, a mechanical error may occur during the rotation of a PTZ camera, so it is necessary to detect the image displacement. As described above, a predetermined image may be set for each scene. After detecting a scene change, if the current image and the predetermined image match, the displacement of the current image relative to the predetermined image may be calculated.

[0059] 8 is a diagram showing an example of sampling, filtering and selection for a matching image according to an embodiment of the present invention. For example, some points in the matching image, such as sampling points 801 in FIG. 8, are sampled on average, and the positions of these sampling points in the current image are tracked using optical flow.

[0060] For example, after optical flow calculation, points that cannot be tracked and points with optical flow calculation error larger than T6 may be omitted. Then, these points are sorted based on the movement distance in the current image and the matching image, points with movement distance larger than T7 are omitted before sorting, and the top T8% points and the bottom T9% points are further omitted. For example, these omitted points are shown as 802 in FIG. 8.

[0061] A partial affine transpose matrix may then be calculated to obtain the remaining points and their positional displacements from the current image, for example, these remaining points are shown as 803 in Fig. 8. The displacement calculation may be performed multiple times, and the average of the displacement results obtained from the multiple calculations is applied to the correction.

[0062] 9 is a diagram showing an example of misalignment correction according to an embodiment of the present invention, where the left part shows a misaligned image and the right part shows that the misaligned image has been corrected.

[0063] In one embodiment, optical flow calculation is performed based on feature points of two consecutive frames in a video image, shake of the video image is detected, and shake correction (which may also be referred to as video correction) is performed on the video image based on the shake detection result.

[0064] For example, a video image may be shaken by wind forces or the passing of a large vehicle, which may make the analyzed video unstable and require shake correction. To detect and correct the effects of these shakes, it is necessary to obtain the transformation matrix of two consecutive frames.

[0065] We may extract some feature points from the first frame and track their positions in the second frame by optical flow calculation. To reduce the effect of moving objects in the video, we may set up simple rules to select suitable points for the partial affine transpose matrix.

[0066] For example, we may omit points whose positions are not found from the second frame. We may consider the error in the optical flow calculation and omit these points if the error is larger than T10. We may sort the remaining points based on the movement distance between the two frames. We may omit the top T11% of points and omit the bottom T12% of points. Then, we may use the positions of these remaining points in two consecutive frames to obtain a partial affine transpose matrix A.

[0067] The partial affine transpose matrix A may be used to calculate the runout values ​​(dx, dy, dθ) according to the following equation:

number

[0068] After the shake value is obtained, a Kalman filter or the like may be used to smooth the shake correction and reduce noise. A new shake value obtained from the Kalman filter may be applied to the shake correction. The specific contents of the partial affine transpose matrix and the optical flow calculation may refer to the related art. In addition, the specific values ​​of the thresholds T1 to T12 may be determined according to, for example, empirical values.

[0069] The above describes exemplary deviation correction and shake correction, and the following describes exemplary updating of the video composition.

[0070] 10 is a diagram showing a video surveillance process according to an embodiment of the present invention, in which two threads are taken as an example to show the video surveillance process. As shown in FIG 10, for example, two threads may be used, a pre-processing thread and an analysis thread, where the pre-processing thread is used for camera anomaly detection and correction, and the analysis thread is used for traffic event analysis.

[0071] For example, the pre-processing thread provides the analysis thread with the following information: Table 1 [Table 1]

[0072] As shown in FIG. 10, a video sequence may be input. When a new frame is input, it is determined whether it is the first frame (1001). If it is the first frame, it directly performs a predetermined image matching (1002), and reports the matching result to the analysis thread to perform initialization processing (2001). If it is not the first frame, it performs scene detection (1003) and determines whether the scene has changed (1004), for example, whether the camera has rotated. If a scene change is detected, it performs a predetermined image matching (1002), and updates the video composition based on the predetermined image matching result (1005).

[0073] As shown in Fig. 10, misalignment detection may be performed, and if there is misalignment, misalignment correction may be further performed (1006). Also, as shown in Fig. 10, shake detection may be performed, and if there is shake, shake correction may be further performed (1007, also called video correction), and the corrected image may be sent to the analysis thread. Note that shake correction does not necessarily have to be performed after misalignment correction, and may be performed, for example, before scene detection, which may further improve the accuracy of scene detection.

[0074] As shown in Fig. 10, the analysis thread may perform an initialization process (2001). In addition, foreground detection (2002), target detection (2003), tracking (2004), and event determination (2005) may be further performed, and the specific contents thereof may be referred to in the related art.

[0075] The above describes each step or process related to the present invention, but the present invention is not limited thereto. The video composition update method may further include other steps or processes, and the specific contents of these steps or processes may refer to the prior art. In addition, the above merely uses the above formulas as an example to describe the embodiments of the present invention, but the present invention is not limited to these formulas, and appropriate modifications may be made to these formulas, and these modifications should be included within the scope of the embodiments of the present invention.

[0076] The above-mentioned embodiments are provided to exemplify the embodiments of the present invention, and the present invention is not limited thereto, and modifications may be made based on the above-mentioned embodiments as appropriate. For example, the above-mentioned embodiments may be used alone, or one or more of the embodiments may be combined.

[0077] In this embodiment, an optical flow calculation is performed according to the feature points of multiple frames in a video image to detect whether the scene of the video shooting has changed, and if the scene has changed, the matching degree between the current frame and multiple predetermined images is calculated for each block, and the matching image that is closest to the current scene is obtained, and the configuration of the video shooting is updated to the configuration corresponding to the closest matching image, so that the video configuration update can be realized by using the video signal without the need to process the control signal, and the configuration update can be easily integrated into the event analysis.

[0078] <Second Example> The embodiment of the present invention provides a video configuration updating device, and the description of the same contents as in the first embodiment will be omitted.

[0079] 11 is a diagram illustrating a video composition updating apparatus according to an embodiment of the present invention. As shown in FIG. 11, the video composition updating apparatus 1100 includes a scene detection unit 1101, an image matching unit 1102, and a composition updating unit 1103.

[0080] The scene detection unit 1101 performs optical flow calculation based on feature points of multiple frames in a video image, and detects whether or not the scene in the video has changed.

[0081] When the scene changes, the image matching unit 1102 calculates the degree of matching between the current frame and a plurality of predetermined images for each block, and obtains a matching image that is closest to the current scene.

[0082] The configuration update unit 1103 updates the configuration of the video shooting to the configuration corresponding to the closest matching image.

[0083] In one embodiment, as shown in FIG. 11, the video composition updating apparatus 1100 further includes a misalignment detector 1104 and a misalignment corrector 1105 .

[0084] The deviation detection unit 1104 performs optical flow calculation based on the sampling points in the matching image, and detects the deviation between the current frame and the matching image.

[0085] The misalignment correction unit 1105 performs misalignment correction on the video image based on the result of the misalignment detection.

[0086] In one embodiment, as shown in FIG. 11, the video composition updating apparatus 1100 further includes a shake detection unit 1106 and a shake correction unit 1107 .

[0087] The shake detection unit 1106 performs optical flow calculation based on feature points of two consecutive frames in the video image, and detects shake in the video image.

[0088] The shake correction unit 1107 performs shake correction on the video image based on the shake detection result.

[0089] It should be noted that the above merely describes each part related to the present invention, and the present invention is not limited thereto. The video composition update device 1100 may further include other components or modules, and the specific contents of these components or modules may refer to the prior art.

[0090] 12 is a diagram illustrating a scene detection unit according to an embodiment of the present invention. In one embodiment, the scene detection unit 1101 includes an initialization unit 1201, a selection unit 1202, and a determination unit 1203, as shown in FIG.

[0091] The initialization unit 1201 selects a reference frame from a video image and extracts a number of feature points from the reference frame.

[0092] The selection unit 1202 selects feature points in the background region in the video image from a plurality of feature points by optical flow calculation.

[0093] The determining unit 1203 classifies the feature points by optical flow calculation, calculates a scene change rate based on the number of feature points after classification, and determines whether or not the scene has changed based on the scene change rate.

[0094] In one embodiment, the selection unit 1202 calculates a score of the feature point, and determines whether the feature point is a feature point of a background region in the video image based on the score.

[0095] In one embodiment, the selection unit 1202 calculates a score for the feature point based on at least one of the following conditions: whether or not a corresponding point in the current frame is obtained by optical flow calculation; whether or not an error in the optical flow calculation is greater than a first threshold; and whether or not a distance between the feature point in the reference frame and the corresponding point in the current frame is greater than a second threshold.

[0096] In one embodiment, when classifying a feature point, the determining unit 1203 classifies the feature point into a first class point if a corresponding point in the current frame is not obtained by optical flow calculation, and / or classifies the feature point into a second class point if an error in the optical flow calculation is smaller than a third threshold, and / or classifies the feature point into a third class point if an error in the optical flow calculation is equal to or greater than the third threshold and the distance between the feature point in the reference frame and the corresponding point in the current frame is smaller than a fourth threshold, and / or classifies the feature point into a fourth class point if the error in the optical flow calculation is equal to or greater than the third threshold and the distance between the feature point in the reference frame and the corresponding point in the current frame is equal to or greater than the fourth threshold.

[0097] In one embodiment, the determining unit 1203 calculates the scene change rate according to the following formula:

[0098] R sc =(N4+N1) / (N1+N2+N3+N4) Here, N1 represents the number of the first class points, N2 represents the number of the second class points, N3 represents the number of the third class points, and N4 represents the number of the fourth class points.

[0099] In one embodiment, the determining unit 1203 performs a first count for the scene change based on the scene change rate and / or the number of feature points, and determines that the scene has changed if the first count increases to a fifth threshold.

[0100] In one embodiment, the decision unit 1203 performs a second count on the scene change delay due to the scene detection, and initializes the scene detection when the second count decreases to zero.

[0101] 11 and 12 only exemplify the connection relationships or signal directions between each component or module, but those skilled in the art may employ various related technologies such as bus connection. Each of the above components or modules may be realized by hardware devices such as a processor, a memory, etc., and the embodiment of the present invention is not limited thereto.

[0102] Although the above embodiments are illustrative of the present invention, the present invention is not limited thereto, and modifications may be made based on the embodiments. For example, the above embodiments may be used alone, or one or more of the above embodiments may be combined.

[0103] In this embodiment, an optical flow calculation is performed according to the feature points of multiple frames in a video image to detect whether the scene of the video shooting has changed, and if the scene has changed, the matching degree between the current frame and multiple predetermined images is calculated for each block, and the matching image that is closest to the current scene is obtained, and the configuration of the video shooting is updated to the configuration corresponding to the closest matching image, so that the video configuration update can be realized by using the video signal without the need to process the control signal, and the configuration update can be easily integrated into the event analysis.

[0104] <Third Example> The embodiment of the present invention further provides an electronic device including the video configuration updating device described in the second embodiment, the contents of which are incorporated herein by reference. The electronic device may be, for example, a computer, a server, a workstation, a laptop computer, a smartphone, etc., and the embodiment of the present invention is not limited thereto.

[0105] Fig. 13 is a diagram showing an electronic device according to an embodiment of the present invention. As shown in Fig. 13, the electronic device 1300 may include a processor (e.g., a central processing unit (CPU)) 1310 and a memory 1320, and the memory 1320 is connected to the processor 1310. The memory 1320 may store various data and a program 1321 for information processing, and executes the program 1321 under the control of the processor 1310.

[0106] In one embodiment, the function of the video composition updating device 1100 may be integrated into the processor 1310. Here, the processor 1310 may be configured to realize the video composition updating method described in the first embodiment.

[0107] In another aspect, the video composition update device 1100 may be respectively arranged with the processor 1310, for example, the video composition update device 1100 may be a chip connected to the processor 1310 and configured to realize the functions of the video composition update device 1100 under the control of the processor 1310.

[0108] In one aspect, the processor 1310 is configured to perform optical flow calculation based on feature points of multiple frames in a video image, detect whether the scene of the video shooting has changed, and if the scene has changed, calculate the matching degree between the current frame and multiple specified images for each block, obtain a matching image that is closest to the current scene, and update the configuration of the video shooting to a configuration corresponding to the closest matching image.

[0109] In one aspect, the processor 1310 is configured to perform optical flow calculations based on sampling points in the matching image, detect a misalignment between the current frame and the matching image, and perform misalignment correction on the video image based on the misalignment detection result.

[0110] In one aspect, the processor 1310 is configured to perform optical flow calculations based on feature points of two consecutive frames in the video image, detect shake in the video image, and perform shake correction on the video image based on the shake detection result.

[0111] In one aspect, the processor 1310 is configured to select a reference frame from a video image, extract a plurality of feature points from the reference frame, select feature points of a background region in the video image from the plurality of feature points by optical flow calculation, classify the feature points by the optical flow calculation, calculate a scene change rate based on the number of feature points after classification, and determine whether the scene has changed based on the scene change rate.

[0112] In one aspect, the processor 1310 is configured to calculate a score for the feature point and determine, based on the score, whether the feature point is a feature point of a background region in the video image.

[0113] In one aspect, the processor 1310 is configured to calculate a score for the feature point based on at least one of the following conditions: whether a corresponding point in the current frame is obtained by optical flow calculation; whether an error in the optical flow calculation is greater than a first threshold; and whether a distance between the feature point in the reference frame and the corresponding point in the current frame is greater than a second threshold.

[0114] In one aspect, the processor 1310 is configured to classify the feature point as a first class point if a corresponding point in the current frame is not obtained by optical flow calculation, and / or to classify the feature point as a second class point if an error in the optical flow calculation is smaller than a third threshold, and / or to classify the feature point as a third class point if an error in the optical flow calculation is equal to or greater than the third threshold and a distance between the feature point in the reference frame and a corresponding point in the current frame is smaller than a fourth threshold, and / or to classify the feature point as a fourth class point if an error in the optical flow calculation is equal to or greater than the third threshold and a distance between the feature point in the reference frame and a corresponding point in the current frame is equal to or greater than the fourth threshold.

[0115] In one embodiment, the processor 1310 is configured to calculate the scene change rate according to the following formula:

[0116] R sc =(N4+N1) / (N1+N2+N3+N4) Here, N1 represents the number of the first class points, N2 represents the number of the second class points, N3 represents the number of the third class points, and N4 represents the number of the fourth class points.

[0117] In one aspect, the processor 1310 is configured to perform a first count for scene changes based on a scene change rate and / or a number of feature points, and determine that the scene has changed if the first count increases to a fifth threshold.

[0118] In one aspect, the processor 1310 is configured to perform a second count for the scene change delay due to the scene detection and to initialize the scene detection if the second count decreases to zero.

[0119] 13, the electronic device 1300 may further include an input / output (I / O) device 1330 and a display 1340. Here, the functions of the above-mentioned components are similar to those of the conventional technology, and the description thereof will be omitted here. Note that the electronic device 1300 may not include all of the components shown in FIG. 13. The electronic device 1300 may include components not shown in FIG. 13, and may refer to the conventional technology.

[0120] The embodiment of the present invention further provides a computer-readable program, which, when executing the program in an electronic device, causes a computer to perform the video configuration updating method according to the first embodiment in the electronic device.

[0121] The embodiment of the present invention further provides a storage medium storing a computer-readable program for causing a computer to execute the video configuration updating method according to the first embodiment in an electronic device.

[0122] The above-mentioned apparatus and method of the present invention may be realized by hardware or a combination of hardware and software. The present invention relates to a computer-readable program, which, when executed by a logic unit, causes the logic unit to realize the above-mentioned apparatus or components, or to realize the above-mentioned various methods or steps. The present invention relates to a storage medium for storing the above-mentioned program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, etc.

[0123] The methods / apparatuses described with reference to the embodiments of the present invention may be implemented in hardware, software modules executed by a processor, or a combination of both. For example, one or more of the functional block diagrams shown in the drawings, or one or more combinations of the functional block diagrams, may correspond to each software module in a computer program flow or each hardware module. These software modules may correspond to each step shown in the drawings. These hardware modules may be realized by implementing these software modules in hardware, for example, using a field programmable gate array (FPGA).

[0124] The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile hard disk, a CD-ROM, or any other form of storage medium known to those skilled in the art. The storage medium may be connected to the processor so that the processor reads information from the storage medium and writes information to the storage medium, or the storage medium may be a component of the processor. The processor and the storage medium are located in an ASIC. The software module may be stored in the memory of the mobile terminal, or in a memory card inserted in the mobile terminal. For example, if the device (e.g., a mobile terminal) uses a MEGA-SIM card or a large capacity flash memory device with a relatively large capacity, the software module may be stored in the MEGA-SIM card or the large capacity flash memory device.

[0125] One or more of the functional blocks and / or one or more combinations of functional blocks depicted in the figures may be implemented in a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or any suitable combination thereof to perform the functions described herein. One or more of the functional blocks and / or one or more combinations of functional blocks depicted in the figures may be implemented in, for example, a combination of computing devices, such as a combination of a DSP and a microprocessor, a combination of multiple microprocessors, one or more microprocessors in combination with a DSP communication, or any other configuration.

[0126] Although the present invention has been described above with reference to specific embodiments, the above description is merely illustrative and does not limit the scope of protection of the present invention. Various modifications and alterations may be made to the present invention without departing from the spirit and principles of the present invention, and these modifications and alterations also fall within the scope of the present invention.

Claims

1. A video composition update device, comprising: a scene detection unit that performs optical flow calculation based on feature points of a plurality of frames in a video image and detects whether a scene captured by a camera has changed; an image matching unit that calculates a matching degree between a current frame and a plurality of predetermined images for each block when the scene changes, and obtains a matching image that is closest to the current scene, the plurality of predetermined images corresponding to a plurality of predetermined positions of the camera, respectively; and a configuration updater for updating the configuration of the video capture to a configuration corresponding to the closest matching image.

2. a deviation detection unit that performs optical flow calculation based on sampling points in the matching image and detects a deviation between the current frame and the matching image; The apparatus according to claim 1 , further comprising: a misalignment correction unit that performs misalignment correction on the video image based on a result of the misalignment detection.

3. a shake detection unit that performs optical flow calculation based on feature points of two consecutive frames of the video image and detects shake of the video image; The apparatus according to claim 1 , further comprising: a shake correction unit that performs shake correction on the video image based on a result of the shake detection.

4. The scene detection unit an initialization unit for selecting a reference frame from the video image and extracting a plurality of feature points from the reference frame; a selection unit that selects feature points of a background region in the video image from the plurality of feature points by optical flow calculation; The device according to claim 1 , further comprising: a decision unit that classifies the feature points by optical flow calculation, calculates a scene change rate based on a number of the classified feature points, and decides whether a scene has changed based on the scene change rate.

5. The selection unit calculates a score for each feature point, and determines whether the feature point is a feature point of a background region in the video image based on the score; 5. The device according to claim 4, wherein the selection unit calculates a score for the feature point based on at least one of the following conditions: whether a corresponding point in the current frame has been obtained by optical flow calculation; whether an error in the optical flow calculation is greater than a first threshold; and whether a distance between a feature point in the reference frame and a corresponding point in the current frame is greater than a second threshold.

6. When classifying the feature points, the determination unit If no corresponding point in the current frame is obtained by optical flow calculation, classify the feature point as a first type point; and / or If the error of the optical flow calculation is less than a third threshold, classify the feature point as a second class point; and / or If the error of the optical flow calculation is equal to or greater than the third threshold and the distance between the feature point in the reference frame and the corresponding point in the current frame is less than a fourth threshold, classify the feature point as a third class point; and / or If an error in optical flow calculation is equal to or greater than the third threshold and a distance between a feature point in the reference frame and a corresponding point in the current frame is equal to or greater than the fourth threshold, classifying the feature point as a fourth class point; The determination unit calculates the scene change rate according to the following formula: R sc =(N 4 +N 1 ) / (N 1 +N 2 +N 3 +N 4 ) Here, N 1 represents the number of the first class points, and N 2 represents the number of the second class points, and N 3 represents the number of the third class points, and N 4 The apparatus of claim 4 , wherein: represents the number of the fourth class points.

7. The apparatus of claim 4 , wherein the decision unit performs a first count for a scene change based on the scene change rate and / or the number of feature points, and determines that a scene has changed if the first count increases to a fifth threshold.

8. The apparatus of claim 4 , wherein the decision unit performs a second count on scene change delay due to scene detection and initializes the scene detection when the second count decreases to zero.

9. 1. A method for updating a video composition, comprising: performing an optical flow calculation based on feature points of a plurality of frames of the video image to detect whether a scene captured by the camera has changed; When the scene changes, calculating a matching degree between the current frame and a plurality of predetermined images for each block, and obtaining a matching image that is closest to the current scene, the plurality of predetermined images respectively corresponding to a plurality of predetermined positions of the camera; updating the video capture configuration to a configuration corresponding to the closest matching image.

10. An electronic device including a memory in which a computer program is stored and a processor, The processor, Calculating optical flow based on feature points of multiple frames of video images captured by a camera to detect whether the scene of the video has changed; When the scene changes, calculating a matching degree between the current frame and a plurality of predetermined images for each block, and obtaining a matching image that is closest to the current scene, the plurality of predetermined images respectively corresponding to a plurality of predetermined positions of the camera; updating the video capture configuration to a configuration corresponding to the closest matching image.

Citation Information

Patent Citations

  • System and method for determining set state

    JP2007008325A

  • Photographing direction determining device, and photographing direction determining program

    JP2009055436A

  • Image correction device, image correction method, and program

    JP2016127419A

  • Facility inspection system, server, facility inspection method and control program

    JP2018025890A