Image analysis system
The image analysis system estimates water levels in irrigation canals and sewage ditches by pattern matching with block images, addressing the need for costly sensors and improving flood detection accuracy.
Patent Information
- Application Number
- JP2023043871
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-10-03
- Estimated Expiration
- 2043-03-20
AI Technical Summary
Existing monitoring systems for flood risk, particularly in irrigation canals and sewage ditches, face challenges due to the need for costly and labor-intensive water level sensors, and they are ineffective in detecting gradual water level rises without noticeable water flow.
An image analysis system that uses an imaging device to capture a monitoring area including a leveling rod, compares the image with a reference image, and performs pattern matching to estimate water levels without the need for new sensors by dividing the leveling rod into block images and calculating similarity to determine water level changes.
Enables accurate water level estimation through image analysis, reducing the reliance on physical sensors and minimizing resource usage while preventing erroneous readings from obstacles or environmental factors.
Smart Images

Figure 2024133874000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image analysis system. [Background technology]
[0002] Monitoring systems that notify residents of flood risks in advance have been known, and involve installing water level sensors in rivers and sewers to obtain advance information on flood damage. In addition, systems that use image analysis have been proposed for monitoring systems installed in rivers, etc.
[0003] For example, the river condition prediction and monitoring system 100 in Patent Document 1 includes an imaging device 10 that captures images of a river, and a calculation device 130 that judges the state of the river based on the river image captured by the imaging device 10. The calculation device 130 calculates the flow speed of the river from the optical flow on the river image at the time of judgment based on a conversion formula (or a correspondence table) that indicates the correspondence between the flow speed measured in advance using a current meter 120 and the optical flow on the river image captured at the time of measurement, and compares the calculated flow speed with a predetermined threshold value to judge whether the river is in a dangerous state or not.
[0004] In addition, in the water level measurement method in Patent Document 2, after the angle of view setting process, the area setting processing unit sets an arbitrary fixed range from the center of the set angle of view as a processing area (S21). Next, the flow processing unit 62 calculates the movement information (flow) and the flow direction from the processing area (S22, S23), calculates the flow density, determines the area with high density and close flow direction as a water flow, and deletes flows in other directions (S24). Next, the graph cut processing unit 63 creates object seeds and background seeds for graph cut (S25, S26), and detects the water surface by automatic graph cut (S27). After the edge extraction processing unit 64 performs edge extraction (S28), the water level calculation processing unit 65 determines the edge that satisfies a predetermined condition as a water level line and outputs the water level measurement result (S29). [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Patent Publication No. 2021-47156 [Patent Document 2] Patent No. 6442641 Summary of the Invention [Problem to be solved by the invention]
[0006] If a water level sensor is used in the monitoring system, the sensor needs to be calibrated periodically, and especially for a water level sensor that is installed on the bottom of the river, known as a "throw-in type," installation work is required. Operating a monitoring system that uses a water level sensor requires a lot of labor and cost. In recent years, in addition to flood damage caused by river flooding (so-called external flooding), there has been an increase in flood damage caused by overflowing irrigation channels, sewers, and the like due to the drainage capacity being overwhelmed (so-called internal flooding). Flooding in irrigation channels and sewers occurs when the water level rises gradually, and there are cases where no noticeable water flow is observed that indicates a flood, as in the case of river flooding. Patent Documents 1 and 2 mainly analyze the water flow of rivers, but there is still room for improvement in monitoring flooding in irrigation channels, sewers, and the like.
[0007] Therefore, an object of the present invention is to provide a technique that makes it possible to obtain water level information through image analysis without using a new water level sensor. [Means for solving the problem]
[0008] In order to solve the above problems, one representative image analysis system of the present invention is an image analysis system that estimates the water level, and includes an imaging device that images a monitoring range including a staff and obtains an image to be analyzed, and a processing device that compares the image to be analyzed with a reference image, which is an image that includes the entire staff, and estimates the water level.The processing device divides the staff included in the reference image into a number of block images, and performs a pattern matching process that calculates the similarity between the reference image and the image to be analyzed at the coordinates of each block image, and determines that the water level has risen to the height of the block image if the similarity is less than a set threshold. Effect of the Invention
[0009] According to the present invention, it is possible to obtain water level information by image analysis without using a new water level sensor. Problems, configurations and effects other than those described above will become apparent from the description of the following embodiments. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a configuration diagram of an image analysis system according to the first embodiment. [Diagram 2] FIG. 2 is a diagram showing an example of a reference image and an image to be analyzed. [Diagram 3] FIG. 3 is a flow chart of the pattern matching process. [Figure 4] FIG. 4 is a diagram showing an example of the analysis target image. [Diagram 5] FIG. 5 is a flow chart for processing multiple frames. [Figure 6] FIG. 6 shows a scene in which multi-frame processing is useful. [Figure 7] FIG. 7 is a diagram showing a method for setting an analysis target image and image blocks in the third embodiment. [Figure 8] FIG. 8 is a diagram showing an example of a reference image in the fourth embodiment. [Figure 9]FIG. 9 is a diagram showing an example of a method for searching the staff partial image. [Figure 10] FIG. 10 is a flowchart of the pattern matching process in the fifth embodiment. [Figure 11] FIG. 11 is a diagram showing an example of an image displayed by the data display device. [Figure 12] FIG. 12 is a diagram showing an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Note that the present invention is not limited to the embodiment. In addition, in the description of the drawings, the same parts are denoted by the same reference numerals.
[0012] [First embodiment] The configuration of the image analysis system according to the first embodiment will be described with reference to Fig. 1. Fig. 1 is a configuration diagram of the image analysis system according to the first embodiment. The image analysis system 1 is an image analysis system for estimating a water level, and is configured to include an imaging device 10, a processing device 20, a data storage device 30, and a data display device 40. The processing device 20 captures an image captured by the imaging device 10 and estimates the water level by image analysis. Furthermore, the processing device 20 transmits the image and the water level estimation result to the data storage device 30. A user of the image analysis system 1 can operate the data display device 40 to view the image and the water level estimation result stored in the data storage device 30.
[0013] The imaging device 10 is a device that captures an image of a monitoring range including a staff and obtains an image to be analyzed, and is installed in a monitoring area such as a specified river area, an irrigation channel, a sewer, etc., and is capable of capturing images of the monitoring range including the staff. Furthermore, the imaging device 10 is capable of capturing images at time intervals while maintaining a constant angle of view in order to measure changes in the water level in the monitoring range. The imaging device 10 may have a pan and tilt function and a zoom function, and may be capable of switching the monitoring range by a user's operation.
[0014] The processing device 20 can acquire the image acquired by the imaging device 10. The processing device 20 is capable of estimating the water level by comparing a reference image, which is an image including the entire staff, with an image to be analyzed, and is capable of estimating the water level by performing pattern matching processing. Details of the processing device 20 will be described separately later.
[0015] A coaxial cable, a LAN cable, wireless communication, or other communication means can be used between the imaging device 10 and the processing device 20. The communication means is not limited to these and can be appropriately selected.
[0016] The data storage device 30 is capable of acquiring the results of the water level estimation performed by the processing device 20. Then, when the data storage device 30 determines that the water level observed in the monitoring area has reached the warning water level based on the results of the water level estimation, it is capable of notifying the data display device 40, which will be described later, that the warning water level has been reached.
[0017] Furthermore, the data display device 40 displays the warning water level notified by the data storage device 30 to notify the user.
[0018] The processing device 20, the data storage device 30, and the data display device 40 are configured by a memory, a server, hardware, etc., but the present disclosure is not limited to this. They may also be configured using cloud services.
[0019] Also, although one imaging device 10 is shown here, it is possible to provide a configuration with multiple imaging devices 10 by installing an imaging device 10 for each monitoring area. In this case, the imaging device 10 attaches to the image to be transmitted identification information for identifying the imaging device 10, information for identifying the shooting time (year, month, day, and time), and the setting information of the surveillance camera at the time of shooting. By recording this information in association with the image, it is possible to determine which imaging device 10 was used, when, and under what circumstances an image stored (recorded) on the data storage device 30 side (described later) was captured, and this can be used on the data storage device 30 side to judge the situation.
[0020] The data storage device 30 may also be configured to create a database of information (data) transmitted from water level observation stations, rainfall observation stations, earthquake observation stations, etc., and display the information (data) on the data display device 40 together with the estimated water level. The data storage device 30 executes a predetermined data processing based on, for example, a predetermined program, and when it is determined that the water level observed at any water level observation station has reached the warning water level, it notifies the data display device 40 of this fact. The conditions (thresholds, etc.) for determining whether the warning water level or the dangerous water level has been reached are set in advance by the user of the image analysis system 1, and the data storage device 30 makes the determination by constantly executing data processing such as comparison of data input one after another. When there is no data accumulation, the conditions for determining whether the warning water level or the dangerous water level has been reached can be determined based on some predetermined conditions empirically, or, if there is data accumulated for each observation station, based on the accumulated data.
[0021] Furthermore, the processing device 20, the data storage device 30, and the data display device 40 may be configured as a cloud service. In that case, when a user connects to the image analysis system 1, the data display device 40 can present information to the user.
[0022] (Overview of pattern matching process) The processing device 20 can estimate the water level by pattern matching between a reference image, which shows a state in which the water level has not yet reached the staff, and the image to be analyzed, and the pattern matching is performed on the staff portion. The processing device 20 also divides the staff included in the reference image into multiple block images, and performs pattern matching processing to calculate the similarity between the reference image and the image to be analyzed at the coordinates of each block image, and can determine that the water level has risen to the height of the block when the similarity is equal to or greater than a set threshold value.
[0023] The pattern matching process performed by the processing device 20 will be described with reference to Fig. 2. The pattern matching process will be described in detail. Fig. 2 is a diagram showing an example of a reference image 200 and an analysis target image 220. Fig. 2(a) shows the reference image 200, and Fig. 2(b) shows the analysis target image 220.
[0024] The reference image 200 and the analysis target image 220 are captured with a common angle of view. In the reference image 200, the staff 210 is marked with a scale indicating the water level, and is placed on a structure, for example, near the gate of an irrigation channel or on the side wall of a sewer. The reference image 200 includes the entire staff 210, and shows a state in which the water level has not yet reached the staff 210. Moreover, the analysis target image 220 shows a state in which the water level has risen and therefore the entire staff 210 cannot be seen.
[0025] First, the processing device 20 extracts the staff 210 included in the reference image 200, and divides the image of the staff 210 into a plurality of block images. In the reference image 200, the staff 210 is captured in a vertical direction. Here, the coordinates in the reference image 200, in other words, the coordinates in the angle of view where the image is captured by the imaging device 10, are represented by (x coordinate, y coordinate). Here, block image 210-1 has coordinates (x0, y0). Block image 210-2 has coordinates (x0, y1). Block image 210-3 has coordinates (x0, y2). Block image 210-4 has coordinates (x0, y3). Block image 210-5 has coordinates (x0, y4). Block image 210-6 has coordinates (x0, y5). Block image 210-7 has coordinates (x0, y6). Block image 210-8 has coordinates (x0, y7). Block image 210-9 has coordinates (x0, y8). Block image 210-10 has coordinates (x0, y9). Although the coordinates of the center of gravity of the block image are used as the coordinates of the block image, the present disclosure is not limited to this, and it is also possible to select the position of an end of the block image as the coordinates of the block image. 2, the staff 210 is set vertically and an image is taken so as to include the staff 210 in the front, so the vertical direction is the y-axis direction and the horizontal direction is the x-axis direction, but the directions are not limited to this. For example, even if it is not possible to capture an image of the front of the staff 210, it is also possible to generate a block image using the longitudinal direction and lateral direction of the staff 210 in the reference image 200.
[0026] The level staff 210 has five graduations overall so that the numbers 1 to 5 can be added, and each block image is half the size of one graduation. The size of the block image is not limited to this size, and the size of the block image can be set appropriately. Furthermore, the level staff 210 is not limited to five graduations, and the number of graduations can be set appropriately. Although the level staff 210 has been exemplified, the present disclosure is not limited to this. It is also possible to use a marking member other than the level staff 210 as long as it indicates a water level indicator.
[0027] The pattern matching process is a process for calculating the similarity between a predetermined block image among the multiple block images 210-1 to 210-10 and a staff partial image of the analysis target image 220 corresponding to the coordinates of the predetermined block image. Specifically, the processing device 20 calculates the similarity between the block image 210-1 and the staff partial image 220-1 of the analysis target image 220 corresponding to the coordinates (x0, y0) of the block image 210-1. Here, the staff partial image 220-1 is a portion of the image that is expected to include the staff 210 when the water level has not yet reached the water level.
[0028] The processing device 20 performs pattern matching processing on each of the multiple block images, and when the calculated similarity is less than a set threshold, it estimates that the water level has reached the height indicated by the staff 210 included in a predetermined block image. Specifically, the processing device 20 performs pattern matching processing on the block image 210-2 and the staff partial image 220-2 of the analysis target image 220 corresponding to the coordinates (x0, y1) of the block image 210-2, and calculates the similarity. Next, the processing device 20 performs pattern matching processing by the following procedures: pattern matching processing on the block image 210-3 and the staff partial image 220-3, pattern matching processing on the block image 210-4 and the staff partial image 220-4, pattern matching processing on the block image 210-5 and the staff partial image 220-5, pattern matching processing on the block image 210-6 and the staff partial image 220-6, and so on, and calculates the similarity.
[0029] Regarding the similarity, in the image 220 to be analyzed, the staff partial image 220-1 to staff partial image 220-5 may not be captured clearly because the water level has reached the image. In such a case, since there is a large difference between the reference image 200 and the image 220 to be analyzed, it is desirable that the similarity between the block image 210-1 and the staff partial image 220-1 or between the block image 210-5 and the staff partial image 220-5 take a small value (a value close to 0 when the similarity is expressed between 0 and 1) such that the patterns do not match. Also, when the staff partial image 220-7 to staff partial image 220-10 are captured clearly because the water level has not reached the image, there is a small difference between the reference image 200 and the image 220 to be analyzed. For this reason, it is desirable that the similarity between block image 210-7 and staff partial image 220-7, or between block image 210-10 and staff partial image 220-10, take a large value, such as a value indicating a case where the patterns match (when similarity is expressed between 0 and 1, a value close to 1).
[0030] Here, the water level has reached the staff partial image 220-6, and part of the staff 210 is clearly shown while the rest is unclear. In this case, the similarity between the block image 210-6 and the staff partial image 220-6 is expected to be an intermediate value between match and mismatch during pattern matching. A threshold value for discriminating between the intermediate values in such a case is set in advance, and when the similarity is less than the threshold value, it is determined that the water level has reached the height indicated by the block image 210-6.
[0031] (Pattern matching process) The processing device 20 performs pattern matching processing from the bottom block among the multiple block images, and when the calculated similarity is equal to or greater than a threshold, it determines that the water level has not reached the staff portion of the block image for which the calculated similarity is equal to or greater than the threshold. Also, when the similarity is less than the threshold, the processing device 20 determines that the water level has reached the staff portion of the block image for which the calculated similarity is less than the threshold, and performs pattern matching processing of the block image one level above.
[0032] The processing device 20 performs pattern matching processing on the block images in order from the bottom one among the multiple block images, and when a similarity degree equal to or greater than the threshold is calculated, the processing device 20 outputs the result as the estimated water level, taking the height of the staff part of the block image for which a similarity degree equal to or greater than the threshold is calculated. At this time, the processing device 20 does not perform pattern matching processing on block images at a higher position than the block image in question.
[0033] The calculation method in the pattern matching process can be appropriately selected. When the analysis target image 220 is captured under bad weather such as rain, it is assumed that high accuracy cannot be ensured when performing pattern matching with the reference image 200. For example, ZNCC (Zero-means Normalized Cross-Correlation) is used. Robust calculation is possible even for the analysis target image 220 affected by changes in sunlight. In addition, although an image of the staff 210 captured almost from the front is acquired in FIG. 2, depending on the monitoring area and installation location, the staff 210 cannot be captured from the front in the angle of view of the imaging device 10, and the staff 210 may be captured in a shape other than a rectangle. In such a case, by using ZNCC, it is possible to perform pattern matching process with high accuracy even if the staff 210 is an arbitrary polygon.
[0034] The procedure of the pattern matching process performed by the processing device 20 will be described with reference to Fig. 3. Fig. 3 is a flow chart of the pattern matching process.
[0035] As a preliminary step of the pattern matching process, the processing device 20 divides the staff 210 included in the reference image 200 into a plurality of block images. The plurality of block images are N block images (N is the number of block images and is a positive integer), and are arranged vertically upward from the first block image to the Nth block image. In the first embodiment, the number of block images is N=10, and the block images 210-1 to 210-10 are arranged vertically upward (in the +y-axis direction).
[0036] In step S2, the processing device 20 performs the pattern matching process on the i-th (i is an integer between 1 and N) block image. If the pattern matching process is performed on the i-th block image and a similarity greater than or equal to the threshold is not calculated (no in step S3), the processing device 20 increments i (step S4) and performs the pattern matching on the i+1-th block image (repeats the process from step S1 to step S5).
[0037] In step S3, if the pattern matching performed on the p-th (p is an integer between 1 and N) block image calculates a similarity equal to or greater than the threshold (yes in step S3), the processing device 20 estimates that the water level has reached the height indicated by the staff portion of the p-th block image (step S6). The processing device 20 estimates that the water level has reached the p-th block, and outputs the estimation result to the data storage device 30.
[0038] In addition, so that the pattern matching process ends after step S6, the processing device performs the pattern matching process in order starting from the first block image, and if a similarity greater than or equal to the threshold is calculated in the pattern matching process for the pth block image, the processing device does not perform the pattern matching process for the p+1th block image.
[0039] (Action and effect) As described above, it is possible to grasp the change in the water level by capturing an image of the monitoring range including the usually installed staff. According to the present disclosure, it is possible to obtain the water level information by image analysis without using a new water level sensor.
[0040] In the first embodiment, if the calculated similarity is equal to or greater than the threshold, the water level estimation result is output and the subsequent pattern matching process is omitted. This makes it possible to prevent unnecessary pattern matching processes and to reduce device resources.
[0041] 4 is a diagram showing an example of an image to be analyzed. The image to be analyzed 221 includes the entire staff 210, and an obstacle 240 such as a bird is located between the staff 210 and the image capture device 10. In this case, if the pattern matching process is performed first on the staff partial image 220-5 or the staff partial image 220-6, the similarity of the staff partial image 220-5 or the staff partial image 220-6 will be calculated to a small value indicating a mismatch, and there is a possibility that an erroneous recognition will occur in the estimation of the water level.
[0042] In contrast, in the first embodiment, the pattern matching process is performed in order, starting with the staff partial image 220-1. Since the water level has not reached the staff partial image 220-1 and it is not hidden by an obstacle, a similarity equal to or greater than the threshold is calculated, and pattern matching process is not performed for the staff partial image 220-2 and onwards. In this way, in the present disclosure, it is possible to prevent erroneous recognition of the water level even when an obstacle such as a bird hides the staff as shown in Fig. 4.
[0043] [Second embodiment] The second embodiment differs from the first embodiment in that it performs multiple frame processing, in other words, pattern matching processing on multiple analysis target images. In the following description, the same or equivalent components as those in the first embodiment described above are denoted by the same reference numerals, and the description thereof will be simplified or omitted.
[0044] In the present disclosure, as a measure for the case where an obstacle 240 such as a bird hides the staff 210 as shown in Fig. 4, the processing device 20 estimates the water level not only for one frame but for multiple consecutive frames, and calculates the OR (Odds Ratio) of the estimation results to prevent erroneous determination due to the obstacle. Fig. 5 is a flowchart for processing multiple frames.
[0045] When estimating the water level for multiple frames, the imaging device 10 captures images of the monitoring range at a predetermined frame rate and obtains multiple analysis target images corresponding to each of the multiple consecutive frames. The processing device 20 also performs pattern matching processing on the multiple analysis target images. In the following description, the number of processing frames, which is the number of consecutive frames, is F (F is a positive integer equal to or greater than 1), and the multiple analysis target images are referred to as analysis target image 2201, analysis target image 2202, ..., analysis target image 2203, ... F In addition, when the image to be analyzed is referred to without specifying it, it may be referred to as the image to be analyzed 220.
[0046] In step S10, the processing device 20 inputs W (for example, the height indicated by the block image 210-10 or the staff portion image 220-10 in FIG. 2) as the maximum water level in the analysis target image 2001.
[0047] In step S12, the analysis target image 220 corresponding to the jth (j is an integer from 2 to F) processing frame among the number of processing frames F is j 3, step S1 to step S6 are executed. For example, the processing device 20 performs pattern matching processing of all the scale partial images for the analysis target image 2001, extracts the maximum water level from the estimated water level results, and sets it as the maximum water level W.
[0048] In step S13, if the water level estimation result is less than the maximum water level W (yes in step S3), the processing device 20 updates the maximum water level W using the water level estimation result (step S14). The processing device 20 increments j (step S15).
[0049] In step S13, if the estimated water level is not less than the maximum water level W (no in step S3), the processing device 20 increments j without updating the maximum water level W (step S15).
[0050] The processing device 20 repeats steps S11 to S16 for the analysis target image 220j+1 corresponding to the j+1th processing frame.
[0051] The processing device 20 repeats steps S11 to S16 up to the Fth processing frame. In step S17, the processing device 20 outputs the maximum water level W as the estimated water level result.
[0052] (Effectiveness of multi-frame processing) FIG. 6 shows a scene in which multi-frame processing is useful.
[0053] Multi-frame processing can use the information shown in Figure 6 as a trigger to switch from processing an image to be analyzed that corresponds to a single frame to processing multiple images to be analyzed that correspond to multiple frames. The fuzzier the image, the lower the similarity tends to be, and the more likely it is that a water level that is higher than the actual water level will be erroneously output. Therefore, by adopting the frame that outputs a lower water level result among multiple frames, the possibility of it being the actual water level increases, and so multi-frame processing is a method of adopting the value of the frame that outputs the lower water level result.
[0054] Regarding the type of information, weather information is acquired as a category from the information source of the Japan Meteorological Agency. When the information indicates sunny weather as an event, the clarity of the image to be analyzed is expected to be high. In this case, even if multiple frame processing is performed, a significant effect is not expected compared to single frame processing. When information indicates cloudy weather as an event is acquired, the clarity of the image to be analyzed is expected to be medium. In this case, the effect of multiple frame processing is expected. When information indicates rain as an event is acquired, the clarity of the image to be analyzed is expected to be low. In this case, a significant effect is expected by performing multiple frame processing.
[0055] In addition, it is possible to grasp the sunlight situation from a real-time image. The real-time image may be obtained by providing the imaging device 10 with a real-time shooting function, or by providing another imaging device separately. When information indicating a shade is acquired as an event, the clarity of the image to be analyzed is low, so the effect of multiple frame processing is expected. On the other hand, when information indicating a sunny spot is acquired as an event, the clarity of the image to be analyzed is high, so the effect of multiple frame processing is not expected. In addition, it is possible to grasp the sunlight situation from the time. When information indicating daytime is acquired as an event, the clarity of the image to be analyzed is high, so the effect of multiple frame processing is not expected. On the other hand, when information indicating night is acquired as an event, the clarity of the image to be analyzed is low, so the effect of multiple frame processing is expected.
[0056] 6 may be configured to be acquired by the processing device 20 and the data storage device 30. It is also possible to provide this information to a user of the image analysis system 1, and to prompt the user as to whether or not to perform multi-frame processing.
[0057] (Action and effect) When estimating the water level for an analysis target image corresponding to a single processed frame, an unexpected problem may occur in the imaging of the scale 210, such as an obstacle being captured, which may result in erroneous recognition in the estimation of the water level. In contrast, in the second embodiment, the water level is estimated using analysis target images corresponding to multiple frames. Even if erroneous recognition occurs in one of the processed frames, the water level is estimated using the multiple frames as a whole, so that the estimation result in which the erroneous recognition occurred can be eliminated, and an appropriate estimation result can be obtained.
[0058] In addition, if it is possible to determine in advance from external information such as weather data that image clarity will be lost in bad weather and that multiple frame processing will be effective, then by dynamically changing the number of frames to be processed according to the weather information, it is possible to reduce calculation costs on sunny days when high-precision processing can be expected even with a small number of frames.
[0059] [Third embodiment] The third embodiment differs from the first embodiment in that a block image is divided. In the following description, the same or equivalent components as those in the first embodiment are denoted by the same reference numerals, and the description thereof will be simplified or omitted.
[0060] Fig. 7 is a diagram showing a method for setting an analysis target image and image blocks in the third embodiment. Fig. 7(a) is a diagram showing an example of an analysis target image 222. Here, the staff 210 portion included in the analysis target image 222 is extracted and shown. Fig. 7(b) is a diagram showing an example of an analysis target image 222 in the third embodiment. Here, a part of the staff 210 is shown enlarged.
[0061] 7(b), for example, if the staff 210 is installed in a place where a depression is provided in the side wall of an irrigation channel with respect to the flow of water, or if there are obstacles around the staff 210 to block the sunlight, the sunlight reaching the staff 210 may be blocked, creating a shade 250 on the staff 210. Due to the effect of this shade 250, even if the staff 210 in the image 222 to be analyzed is not immersed in water, the similarity calculated as a result of the pattern matching process may be a small value indicating a mismatch, leading to an erroneous determination.
[0062] In the third embodiment, as shown in Fig. 7(b), a plurality of block images 210-1 to 210-10 are divided in the horizontal direction, and the pattern matching results of each divided block image are ORed. In this way, a larger value indicating a match in the similarity can be calculated for block images not affected by the shade, making it possible to prevent erroneous determination.
[0063] As an example of a specific procedure, first, in the reference image 201, the processing device 20 divides the staff 210 into a plurality of block images 210-1 to 210-10. Next, the processing device 20 compares the reference image 201 with the analysis target image 222. When the similarity between the block images 201-1 to 210-10 and the staff partial images of the analysis target image 222 corresponding to the coordinates of the block images 201-1 to 210-10 is calculated, the similarity is calculated as a relatively small value indicating a mismatch in, for example, a predetermined number or more of block images.
[0064] When a situation occurs in which many of the similarities have relatively small values indicating mismatch, the processing device 20 divides the block images 210-1 to 210-10 in the x-axis direction. Specifically, the block image 210-1 indicated by the dashed line is divided into block images 210-1L and 210-1R indicated by diagonal lines. The block images from block image 210-2 onwards are also divided, and are divided into block images 210-2L and 210-2R, block images 210-3L and 210-3R, ..., block images 210-10L and 210-10R.
[0065] The processing device 20 performs a pattern matching process on the block image 210-1L, and also performs a pattern matching process on the block image 210-1R. The similarities calculated by the two pattern matching processes are ORed, and the higher of the two similarities is adopted as the similarity of the block image 210-1. Similarly, for the remaining block images, the similarities of the divided block images are ORed, and the higher similarity is adopted.
[0066] (Action and effect) In this way, it is possible to compare the reference image 201 with the image to be analyzed 222 while eliminating the effect on the water level estimation of parts of the image to be analyzed 222 that are affected by the shade.
[0067] Although the trigger for dividing a block image is the calculation of a similarity indicating a predetermined number of mismatches, the present disclosure is not limited to this. Block images may be divided based on a specific time period during which images are captured. Furthermore, the method of division is not limited to the method disclosed herein. If the staff is not captured from the front in the reference image, the staff may be divided in the short direction.
[0068] [Fourth embodiment] The fourth embodiment differs from the first embodiment in the method of setting block images. In the following description, the same or equivalent components as those in the first embodiment are denoted by the same reference numerals, and the description thereof will be simplified or omitted.
[0069] If the number of pixels in a block image is small, the accuracy of pattern matching is low, so it is necessary to ensure that each block image has a certain size or more. Therefore, when increasing the resolution of the estimated water level, if the staff included in the reference image is divided into multiple block images, the multiple block images are set so that the block images overlap each other without reducing the size of the block images.
[0070] Fig. 8 is a diagram showing an example of a reference image in the fourth embodiment. Here, a portion of the scale 210 included in the reference image 203 is shown enlarged. Block image 211-1 has coordinates (x0, y0). Block image 211-2 has coordinates (x0, y1). Block image 211-3 has coordinates (x0, y2). Block image 211-4 has coordinates (x0, y3). Block image 211-5 has coordinates (x0, y4). Block image 211-6 has coordinates (x0, y5).
[0071] Here, the block images 211-1 and 211-2 overlap by one-fifth of their areas in the y-axis direction. The block images 211-2 and 211-3 overlap by one-fifth of their areas in the y-axis direction. The block images 211-3 and 211-4 overlap by one-fifth of their areas in the y-axis direction. The block images 211-4 and 211-5 overlap by one-fifth of their areas in the y-axis direction. The block images 211-5 and 211-6 overlap by one-fifth of their areas in the y-axis direction.
[0072] In this manner, a plurality of block images are set so that the block images overlap each other. The processing device 20 performs a pattern matching process on the plurality of block images.
[0073] (Action and effect) When a sufficient number of pixels cannot be secured for the image to be analyzed, it may be difficult to ensure the accuracy of the pattern matching process. In such cases, the size of each block image is secured, but the block images are set so that they overlap. By calculating the similarity multiple times in the overlapping areas, it is possible to compensate for the lack of a sufficient number of pixels. This makes it possible to ensure the accuracy of the water level estimation.
[0074] Although the block images are set to overlap by one-fifth in the above example, the present disclosure is not limited to this. The size of the overlapping area can be appropriately selected based on the properties of the images to be analyzed, such as the number of pixels.
[0075] [Fifth embodiment] The fifth embodiment differs from the first embodiment in that a scale portion image of an analysis target image is searched for. In the following description, the same or equivalent components as those in the first embodiment described above are denoted by the same reference numerals, and the description thereof will be simplified or omitted.
[0076] The imaging device 10 may move slightly due to the influence of wind, etc., and the angle of view of the camera may deviate (shift) from the angle of view of the reference image by several pixels. The effect of the shift may significantly reduce the similarity of the pattern matching and cause a misjudgment, so as a countermeasure, a search range is set in the horizontal and vertical directions by the expected amount of shift, and a predetermined block image among the multiple block images is moved by one pixel at a time while performing pattern matching multiple times, and the highest similarity is used for threshold judgment. This makes it possible to identify the staff portion corresponding to the block image even if a shift occurs, and prevents a misjudgment.
[0077] 9 is a diagram showing an example of a method for searching a staff partial image. A block image 212 is shown in an analysis target image 223. The block image 212 has coordinates (xa1, ya1), and is placed at a location corresponding to the coordinates (xa1, ya1) in the analysis target image 223. Here, the movement range 2100 is divided into sections on the x-axis and y-axis for each pixel.
[0078] After the pattern matching process is performed on the block image 212, the coordinates of the block image 212 are moved to (xa2, ya1) and the next pattern matching process is performed. Thereafter, the pattern matching process is performed while moving the block image 212 to a position at coordinates (xa5, ya5). The water level is estimated using the similarity calculated while repeating the pattern matching process. As a result, the range in the analysis target image 221 is expanded from the size of the block image 212 to the size of the search range 2200, and the staff partial image is searched for.
[0079] It should be noted that the movement range 2100 and the search range 2200 are not limited to the example shown in Fig. 9. For example, the data storage device 30 can obtain information on weather conditions such as wind and earthquakes, and select the movement range 2100 and the search range 2200 based on this information. It is also assumed that the installation state of the imaging device 10 changes due to aging. The method of the fifth embodiment may be performed after a predetermined period of time has passed since installation. In addition, although the movement range 2100 is divided into horizontal and vertical directions, the directions are not limited to these. For example, it is also possible to use the longitudinal and lateral directions of the staff portion in the reference image.
[0080] 10 is a flow chart of the pattern matching process in the fifth embodiment. In step S20, the processing device 20 divides the staff 210 included in the reference image into N block images. In step 23, the processing device 20 performs the pattern matching process on the i-th block image.
[0081] In step S23, if the similarity is less than a predetermined threshold (no in step S23), it is expected that there is no staff portion image at the position of the analysis target image corresponding to the coordinates of the i-th block image. In this case, the pattern matching process is performed while moving the i-th block image in the movement range 2100 (loop 2 shown in steps S21 to S24).
[0082] When the pattern matching process for the i-th block image has been performed over the entire movement range 2100, i is incremented (step S25), and loop 2 is performed for the i+1-th block image.
[0083] In step S23, if the pattern matching performed on the p-th (p is an integer between 1 and N) block image calculates a similarity equal to or greater than the threshold (yes in step S23), the processing device 20 estimates that the water level has reached the height indicated by the staff portion of the p-th block image (step S27). The processing device 20 estimates that the water level has reached the p-th block, and outputs the estimation result to the data storage device 30.
[0084] (Action and effect) As described above, in the fifth embodiment, the pattern matching process is performed while moving the block image in the analysis target image. Even if there is a misalignment in the angle of view between the reference image and the analysis target image, the staff portion corresponding to the block image can be identified, and erroneous judgments in estimating the water level can be prevented.
[0085] [Sixth embodiment] The sixth embodiment differs from the first embodiment in that the state of the monitoring device is notified. In the following description, the same or equivalent components as those in the first embodiment described above are denoted by the same reference numerals, and the description thereof will be simplified or omitted.
[0086] If there is a block image with low similarity for a long period of time, the system will alert the user that the block image may have dirt or other stains that could cause a misjudgment. If the user visually checks the latest image and finds dirt or other stains, the system will take measures such as updating the reference image and removing the dirt.
[0087] For example, the processing device 20 takes statistics of block images where a water level is estimated to have been reached during monitoring. After a predetermined period of time has elapsed, the processing device 20 notifies the data display device 40 of the results of the statistics. The user can grasp the results of the statistics via the data display device 40.
[0088] (Action and effect) According to the sixth embodiment, the user is notified that there is a physical obstacle such as an object attached to the imaging device 10. This makes it possible to improve the state in which erroneous recognition occurs in the estimation of the water level.
[0089] [Seventh embodiment] The seventh embodiment differs from the first embodiment in that the user is notified of the similarity. In the following description, the same or equivalent components as those in the first embodiment are denoted by the same reference numerals, and the description thereof will be simplified or omitted.
[0090] FIG. 11 is a diagram showing an example of an image 41 displayed by the data display device 40. The image 41 may be displayed on the display unit of the data display device 40, or may be displayed by the data display device 40 on a client device operated by a user. The image 41 shows, for example, staff partial images 221-1 to 221-5 among the images to be analyzed, and a score display 42. The score display 42 is the similarity calculated by a pattern matching process performed on adjacent staff partial images. The similarity of the staff partial image 221-1 is 0.012, the similarity of the staff partial image 221-2 is 0.033, the similarity of the staff partial image 221-3 is 0.417, the similarity of the staff partial image 221-4 is 0.920, and the similarity of the staff partial image 221-5 is 0.943.
[0091] In addition, the staff portion images 221-1 to 221-3 are displayed with dashed lines, and the staff portion images 221-4 and 221-5 are displayed with solid lines. The dashed lines indicate staff portion images whose similarity is below the threshold, and the solid lines indicate staff portions whose similarity is equal to or above the threshold.
[0092] [Example] FIG. 12 is a diagram showing an embodiment. FIG. 12(a) shows a reference image, and FIG. 12(b) shows an image to be analyzed. In FIG. 12(a), the staff 210 is provided on a wall beside a water gate, and the entire staff is visible. An image including the entire staff is used as a reference image, and processing is performed to divide the image into image blocks. On the other hand, in FIG. 12(b), the water level has reached a part of the staff 210, and the entire staff 210 cannot be seen. The water level is estimated for such an image, and in FIG. 12(b), a score display 42 is shown, and the similarities are 0.795, 0.438, 0.07, and 0.078, respectively. The height to which the water level has reached is determined by referring to the similarities.
[0093] (Action and effect) As shown in Figure 11, the pattern matching results (similarity) are displayed next to each block image, and blocks with a similarity below a threshold are displayed with a dashed line, allowing the user to visually confirm the results of image analysis and improving the visibility of the UI.
[0094] [Other embodiments] The following are some possible embodiments of the present invention, but the present invention is not limited thereto. (Aspect 1) 1. An image analysis system for estimating water levels, comprising: an imaging device that captures an image of a monitoring range including the staff and acquires an image to be analyzed; a processing device for comparing a reference image, which is an image including the entirety of the level staff, with the image to be analyzed to estimate a water level; The processing device includes: An image analysis system that divides the scale included in the reference image into multiple block images, performs a pattern matching process to calculate the similarity between the reference image and the image to be analyzed at the coordinates of each block image, and determines that the water level has risen to the height of the block image if the similarity is below a set threshold. (Aspect 2) In the image analysis system according to aspect 1, The processing device includes: An image analysis system that performs the pattern matching process starting with the bottom-most block image among the multiple block images, and if the calculated similarity is greater than or equal to a threshold, determines that the water level has not reached the scale portion of the block image for which a similarity greater than or equal to the threshold was calculated, and if the similarity is less than the threshold, determines that the water level has reached the scale portion of the block image for which a similarity less than the threshold was calculated, and performs the pattern matching process of the block image one level higher. (Aspect 3) In the image analysis system according to embodiment 1 or 2, The processing device includes: The image analysis system performs the pattern matching process starting from the bottommost block image among the multiple block images, and when a similarity degree calculated to be greater than or equal to the threshold value is calculated, the height of the scale portion of the block image for which a similarity degree calculated to be greater than or equal to the threshold value is output as the estimated water level, determining that the water level has risen to the block image below that block image, and does not perform the pattern matching process on block images at a higher position than that block image. (Aspect 4) In the image analysis system according to any one of aspects 1 to 3, The processing device is an image analysis system that performs water level estimation not only for one frame but for multiple consecutive frames. (Aspect 5) In the image analysis system according to any one of aspects 1 to 4, The processing device includes: An image analysis system that divides the plurality of block images in the horizontal direction and performs an OR operation on the pattern matching results of each divided block image. (Aspect 6) In the image analysis system according to any one of aspects 1 to 5, The processing device is an image analysis system in which, when increasing the resolution of the estimated water level, the processing device divides the scale included in the reference image into multiple block images, and sets the multiple block images so that the block images overlap each other without reducing the size of the block images. (Aspect 7) In the image analysis system according to any one of aspects 1 to 6, The processing device includes: An image analysis system that sets a search range in the horizontal and vertical directions to accommodate the expected shift, performs pattern matching multiple times while moving a specific block image among the multiple block images by one pixel, and uses the highest similarity for threshold determination. (Aspect 8) In the image analysis system according to any one of aspects 1 to 7, The image analysis system uses ZNCC (Zero-means Normalized Cross-Correlation) as a calculation method for the pattern matching process, which can be robustly calculated for images to be analyzed that are affected by changes in sunlight. (Aspect 9) In the image analysis system according to any one of aspects 1 to 8, An image analysis system that uses ZNCC as a calculation method for the pattern matching process when the staff is captured in a shape other than a rectangle depending on the angle of view of the imaging device. (Aspect 10) In the image analysis system according to any one of aspects 1 to 9, the pattern matching process calculates a similarity between a predetermined block image of the plurality of block images and an image of a staff portion of the analysis target image corresponding to a coordinate of the predetermined block image; performing the pattern matching process on each of the plurality of block images; An image analysis system that estimates that the water level has reached the height indicated by the staff included in the specified block image if the calculated similarity is less than a set threshold. (Aspect 11) In the image analysis system according to any one of aspects 1 to 12, The plurality of block images are N block images (N is a positive integer), and are arranged vertically upward from a first block image to an Nth block image, The processing device includes: The pattern matching process is performed on the i-th (i is an integer between 1 and N) block image; performing the pattern matching process on the i-th block image, if a similarity greater than or equal to the threshold is not calculated, performing the pattern matching on the i+1-th block image; An image analysis system that estimates that if the pattern matching performed on the pth (p is an integer greater than or equal to 1 and less than or equal to N) block image calculates a similarity greater than or equal to the threshold, the water level has reached the height indicated by the scale portion of the pth block. (Aspect 12) In the image analysis system according to any one of aspects 1 to 11, The processing device performs the pattern matching process in order from the first block image, and if a similarity greater than or equal to the threshold is calculated in the pattern matching process for the pth block image, the processing device does not perform the pattern matching process for the p+1th block image. (Aspect 13) In the image analysis system according to any one of aspects 1 to 12, The imaging device includes: capturing an image of the monitoring range at a predetermined frame rate and acquiring a plurality of analysis target images corresponding to each of a plurality of consecutive frames; The processing device includes: An image analysis system that performs the pattern matching process on the multiple analysis target images.
[0095] Although the embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment, and various modifications are possible without departing from the gist of the present invention. [Explanation of symbols]
[0096] 1...image analysis system, 10...imaging device, 20...processing device, 30...data storage device, 40...data display device, 41...image, 42...score display, 200-203...reference image, 201-1-201-10, 210-1L-210-10L, 210-1R-210-10R, 211-1-211-6, 212...block image, 210...staff, 220, 221, 223...analysis target image, 220-1-220-10, 221-1-221-5...staff portion image, 2100...movement range, 2200...search range, 240...obstacle, 250...shade
Claims
1. An image analysis system for estimating water levels, comprising: an imaging device that captures an image of a monitoring range including the staff and acquires an image to be analyzed; a processing device that compares a reference image, which is an image including the entire staff, with the image to be analyzed to estimate a water level; The processing device includes: An image analysis system that divides the leveling rod included in the reference image into multiple block images, performs pattern matching processing to calculate the similarity between the reference image and the image to be analyzed at the coordinates of each block image, and determines that the water level has risen to the height of the block image if the similarity is less than a set threshold.
2. 2. The image analysis system according to claim 1, The processing device includes: An image analysis system that performs the pattern matching process starting with the bottom-most block image among the multiple block images, and if the calculated similarity is greater than or equal to a threshold, determines that the water level has not reached the staff portion of the block image for which a similarity greater than or equal to the threshold was calculated, and if the similarity is less than the threshold, determines that the water level has reached the staff portion of the block image for which a similarity less than the threshold was calculated, and performs the pattern matching process on the block image one level higher.
3. 2. The image analysis system according to claim 1, The processing device includes: An image analysis system that performs the pattern matching process on the plurality of block images, starting from the bottom-most block image, and when a similarity greater than or equal to the threshold is calculated, outputs the result as the estimated water level, determining that the water level has risen to the block images below that block image, and does not perform the pattern matching process on block images at a higher position than that block image.
4. 4. The image analysis system according to claim 1, The processing device is an image analysis system that performs water level estimation not only for one frame but for multiple consecutive frames.
5. 4. The image analysis system according to claim 1, The processing device includes: An image analysis system that divides the plurality of block images in the horizontal direction and performs an OR operation on the pattern matching results of each divided block image.
6. 4. The image analysis system according to claim 1, The processing device is an image analysis system that, when increasing the resolution of the estimated water level, divides the scale included in the reference image into multiple block images, and sets the multiple block images so that the block images overlap each other without reducing the size of the block images.
7. 4. The image analysis system according to claim 1, The processing device includes: An image analysis system that sets a search range in the horizontal and vertical directions by the amount of expected deviation, performs pattern matching multiple times while moving a specific block image among the multiple block images by one pixel, and uses the highest similarity to determine the threshold.
Citation Information
Patent Citations
Displacement detection method of incremental absolute grating ruler based on neural network
CN111189396A
Non-contact intelligent monitoring system for water level, flow velocity and flow based on video image recognition algorithm
CN114373156A
Non-contact water level measurement method and device based on deep learning and related medium
CN115331001A
Measurement method for determining water level by matching standard template with water gauge in image
CN115345810A
Method and device for measuring liquid level
JP2000180247A
Cited By
Water level measuring method and device based on image recognition
CN119273747A
