Water meter reflection processing method, system and terminal based on image acquisition
By identifying and processing the surface spot characteristics of smart water meter, the problem of reflection affecting image acquisition is solved, and more efficient and accurate water meter image acquisition is achieved, ensuring the system's real-time monitoring capabilities.
Patent Information
- Application Number
- CN202510383041.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-27
AI Technical Summary
In outdoor environments, the camera is difficult to collect images normally due to reflection problems, which affects the accurate monitoring and remote management of water consumption.
By identifying the area and outline of the light spot feature, determine whether it blocks the dial display area, and use corresponding processing methods, such as camera offset or image stitching, or using a water sprayer to form a water curtain to reduce light, ensuring the integrity of image acquisition.
It improves the efficiency and accuracy of image acquisition of smart water meter, reduces the time to wait for reflection to disappear, and ensures real-time monitoring of the water meter status by the system.
Smart Images

Figure CN120219685A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water meters, and in particular, to a method, system, and terminal for anti-reflection processing of a water meter based on image acquisition. Background Art
[0002] An intelligent water meter is a new type of water meter that combines Internet of Things, sensor, and data analysis technologies, and can achieve accurate monitoring, remote management, and intelligent analysis of water consumption.
[0003] Intelligent water meters are usually installed in outdoor environments. Since intelligent water meters can remotely read meters without the need for manual on-site meter reading and counting, there is less management of water meters. Due to the complexity of the outdoor environment, water meters may encounter abnormal situations. Enterprises usually install cameras to collect images of the water meter status to ensure the normal operation of the water meter. Since the surface of the intelligent water meter is made of glass, when there is strong light irradiation and reflection occurs, it may affect the normal image acquisition of the camera and the image cannot be recognized smoothly. When encountering the above problems, the system usually waits for a period of time until there is no reflection on the water meter surface before performing image acquisition, and the waiting time cannot be specifically controlled, resulting in low efficiency of image acquisition, which needs to be improved. Summary of the Invention
[0004] In order to improve the efficiency of image acquisition of intelligent water meters, the present invention provides a method, system, and terminal for anti-reflection processing of a water meter based on image acquisition.
[0005] In a first aspect, the present invention provides a method for anti-reflection processing of a water meter based on image acquisition, adopting the following technical solution:
[0006] A method for anti-reflection processing of a water meter based on image acquisition includes:
[0007] Obtain an image of the instrument dial;
[0008] Determine the area of the spot feature according to the instrument dial image and the preset spot feature;
[0009] When the area of the spot feature is not greater than the preset reference reflection area, it is defined as reflection at a specific angle, and determine the contour of the spot feature according to the instrument surface image and the spot feature;
[0010] Judge whether the contour of the spot feature coincides with the contour of the preset reading and recognition area;
[0011] When and only when there is a coincidence, control the preset camera to move and adjust to either the left or right side of the water meter at a preset offset angle to avoid the spot feature for image acquisition;
[0012] When the area of the light spot feature is greater than the reference reflective area, it is defined as partial reflection at all angles. The circumferential acquisition and processing of the meter dial image of the water meter are performed by a preset image stitching method.
[0013] By adopting the above technical solution, when the camera acquires an image of the water meter dial, if a light spot feature appears in the dial, the system will identify the area and contour of the light spot feature to determine whether the light spot feature will cover the indication area of the dial. For different covering situations, the system will adopt different processing methods to ensure that the camera can completely obtain the dial image, thereby improving the efficiency of water meter image acquisition.
[0014] Optionally, the image stitching method includes:
[0015] Control the camera to move circumferentially around the water meter along a preset circumferential movement path, and obtain circumferential instantaneous images during the movement;
[0016] Extract the dial data image from each circumferential instantaneous image according to the read recognition area contour;
[0017] Remove the light spot feature from each dial data image according to the light spot feature contour to obtain a corrected dial image;
[0018] Stitch and combine all the corrected dial images to obtain a stitched dial image;
[0019] Determine whether the water meter image is complete according to the stitched dial image and a preset reference dial image;
[0020] Complete the image acquisition of the water meter if and only if the stitched dial image is complete.
[0021] Optionally, sprinklers are arranged at intervals in the circumferential direction of the water meter, and each sprinkler is numbered. Each sprinkler can spray water upward to form a water curtain above the water meter; the processing method when the light spot feature completely blocks the water meter dial includes:
[0022] Determine the position of the light spot feature according to the meter dial image and the light spot feature;
[0023] Determine the illumination direction of the light-emitting object according to the position of the light spot feature and the preset camera position;
[0024] Match the sprinkler number according to the illumination direction of the light-emitting object;
[0025] Control the sprinkler to spray water upward to form a water curtain above the water meter in a preset intermittent spraying mode according to the sprinkler number to weaken the light, and obtain the spraying moment image when the sprinkler sprays water;
[0026] Determine the position of the gap between the water curtain and the water meter according to the spraying moment image;
[0027] Control the camera to acquire the position at the gap and collect images of the water meter dial.
[0028] Optionally, it further includes:
[0029] Determine the brightness of the spot feature based on the instrument dial image and the spot feature;
[0030] Determine the brightness reduction value based on the brightness of the spot feature and the preset reference spot brightness;
[0031] Match the instantaneous water spray volume of the water sprayer according to the brightness reduction value;
[0032] When and only when the instantaneous water spray volume of the water sprayer is not greater than the preset reference water consumption, control the water sprayer to spray water according to the instantaneous water spray volume, and acquire the instrument dial image and the day-night type, where the day-night type includes day and night;
[0033] Based on night, determine the brightness of the water meter dial according to the instrument dial image;
[0034] When the brightness of the water meter dial is less than the preset acquisition brightness, control the preset dial auxiliary lamp to perform auxiliary lighting on the dial.
[0035] Optionally, the brightness compensation method for the water meter instrument dial in the daytime includes:
[0036] Based on day, acquire the direction of sunlight;
[0037] Determine the theoretical reflection position of the preset theoretical reflecting surface that can scatter sunlight onto the water meter dial according to the direction of sunlight;
[0038] Match the water sprayer number according to the theoretical reflection position;
[0039] Control the water sprayer to spray water according to the water sprayer number to form a water curtain at the theoretical reflection position to scatter sunlight onto the water meter dial to increase the dial brightness.
[0040] Optionally, a light-shielding cover for blocking the reflective light spot is provided on the water meter, and the control method of the light-shielding cover includes:
[0041] Acquire the shadow image of the light-shielding cover;
[0042] Analyze and determine the shadow orientation and the shadow elongation length according to the shadow image;
[0043] Determine the bright spot light source orientation according to the preset light-shielding cover size parameters, shadow orientation, and shadow elongation length;
[0044] Determine the light-shielding cover blocking position according to the bright spot light source orientation;
[0045] Determine the rotation angle of the light-shielding cover according to the preset initial position and the light-shielding cover blocking position;
[0046] Rotate the light-shielding cover from the initial position to the light-shielding position according to the rotation angle of the light-shielding cover, and determine whether there is a preset light-shielding cover feature in the instrument dial image according to the instrument dial image;
[0047] When there is a light-shielding cover feature in the instrument dial image, determine whether the water meter dial is blocked by the light-shielding cover according to the light-shielding cover feature and the contour of the reading and recognition area;
[0048] When and only when the water meter dial is not blocked by the light-shielding cover, complete the image acquisition of the water meter dial.
[0049] Optionally, a lens is provided on the light-shielding cover; the processing method when the light-shielding cover is in the light-shielding position and blocks the water meter dial includes:
[0050] When the light-shielding cover blocks the water meter dial, determine the light-shielding cover angle range according to the preset camera position, the preset dial position, and the contour of the reading and recognition area;
[0051] Select the middle angle position from the light-shielding cover angle range;
[0052] Control the light-shielding cover to rotate from the light-shielding position to the middle angle position, and control the camera to perform image acquisition on the lens on the light-shielding cover to obtain a reverse dial image;
[0053] Perform an inversion process on the reverse dial image and output a corrected dial image.
[0054] Optionally, when the camera performs image acquisition through the lens, it is easily damaged by strong light in the lens. The protection method for the camera includes:
[0055] Determine the light source reflection position according to the camera position and the middle angle position;
[0056] Determine the theoretical shadow state of the light-shielding cover according to the light source reflection position, the middle angle position, and the light-shielding cover size parameter;
[0057] Judge whether the shadow image of the light-shielding cover is consistent with the theoretical shadow state of the light-shielding cover;
[0058] When and only when the shadow image of the light-shielding cover is consistent with the theoretical shadow state of the light-shielding cover, determine the maximum adjustment angle according to the light-shielding cover angle range;
[0059] Rotate and adjust the light-shielding cover according to the maximum adjustment angle.
[0060] In a second aspect, the present application provides a light reflection processing system for a water meter based on image acquisition, adopting the following technical solutions:
[0061] A light reflection processing system for a water meter based on image acquisition, comprising:
[0062] An acquisition module, configured to acquire an instrument dial image, a circumferential instantaneous image, a water spraying moment image when a water sprinkler sprays water, a day-night type, a solar illumination direction, and a shadow image of a light-shielding cover;
[0063] A memory, configured to store a program of any one of the above-mentioned water meter anti-reflection processing methods based on image acquisition;
[0064] A processor, the program in the memory can be loaded and executed by the processor and implement a water meter anti-reflection processing method based on image acquisition.
[0065] In a third aspect, the present application provides a terminal, adopting the following technical solution:
[0066] A terminal, including a memory and a processor, and a computer program capable of being loaded and executed by the processor for any one of the above-mentioned water meter anti-reflection processing methods based on image acquisition is stored on the memory.
[0067] In summary, the present application includes at least one of the following beneficial technical effects:
[0068] 1. When the camera acquires an image of the water meter dial, if a light spot feature appears in the dial, the system will identify the area and contour of the light spot feature to determine whether the light spot feature will cover the indication area of the dial. For different covering situations, the system will adopt different processing methods for processing to ensure that the camera can completely acquire the dial image, thereby improving the efficiency of water meter image acquisition;
[0069] 2. The system sprays water through a water sprinkler arranged circumferentially on the water meter to form a water curtain, blocking or weakening the light irradiating on the water meter dial, thereby eliminating the anti-reflection situation; and when the brightness of the dial is low, the system synchronously controls the water sprinkler to spray water to generate a water curtain that can scatter sunlight onto the dial, thereby increasing the brightness of the dial;
[0070] 3. The system can block light through a light-shielding cover arranged on the water meter, and when the light-shielding cover affects the image acquisition of the camera, rotate the light-shielding cover to a suitable position so that the camera can acquire the dial image through the lens on the light-shielding cover. Description of the Drawings
[0071] Figure 1 is a method flow chart of a water meter anti-reflection processing method based on image acquisition according to an embodiment of the present invention;
[0072] Figure 2 is a method flow chart of an image stitching method according to an embodiment of the present invention;
[0073] Figure 3It is the method flow of the processing method when the spot characteristics in the embodiment of the present invention completely cover the water meter dial Figure 1 ;
[0074] Figure 4 It is the method flow of the processing method when the spot characteristics in the embodiment of the present invention completely cover the water meter dial Figure 2 ;
[0075] Figure 5 It is the method flow chart of the brightness compensation method for the water meter instrument dial in the daytime in the embodiment of the present invention;
[0076] Figure 6 It is the method flow chart of the light-shielding cover control method in the embodiment of the present invention;
[0077] Figure 7 It is the method flow chart of the processing method when the light-shielding cover is in the light-shielding position and covers the water meter dial in the embodiment of the present invention;
[0078] Figure 8 It is the method flow chart of the protection method for the camera in the embodiment of the present invention. Detailed implementation manners
[0079] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0080] The embodiments of the present application disclose a reflection processing method for a water meter based on image acquisition.
[0081] Refer to Figure 1 , a reflection processing method for a water meter based on image acquisition includes the following steps:
[0082] Step S100: Obtain an image of the instrument dial.
[0083] The image of the instrument dial refers to an image obtained by taking a picture of the dial position of the water meter. The image contains the water meter reading in the dial. By analyzing the image of the water meter instrument dial, the current situation of the water meter can be known. The image of the instrument dial is obtained by taking a picture through a camera arranged on one side of the water meter.
[0084] Step S101: Determine the spot feature area according to the image of the instrument dial and the preset spot features.
[0085] The spot feature refers to a high-brightness spot formed by reflection when strong light shines on the dial. When the spot feature covers the water meter reading, the water meter reading cannot be read.
[0086] The spot feature area refers to the area of the spot feature that appears on the surface of the water meter dial when the camera captures the image of the water meter dial. By performing image recognition and analysis on the spot feature in the image of the instrument dial, the spot feature area can be determined. The method of image recognition and analysis is a prior art and will not be elaborated here.
[0087] Step S1011: When the spot feature area is not greater than the preset reference reflection area, it is defined as specific-angle reflection, and the spot feature contour is determined according to the instrument surface image and the spot feature.
[0088] The indication area on the dial only occupies a part of the dial area. When the spot feature area is small, even if there is a spot feature, the spot feature can exist outside the indication area on the dial and is not likely to interfere with the indication area. At this time, the area of the spot feature is the reference reflection area.
[0089] The spot feature contour refers to the contour of the spot feature in the image of the instrument dial captured by the camera. The spot feature contour can be obtained by performing image recognition and analysis on the spot feature in the instrument dial image.
[0090] When the spot feature area is not greater than the reference reflection area, there is a possibility that the spot feature may not affect the dial indication area. At this time, first determine the spot feature contour, and then perform image analysis according to the actual situation to determine.
[0091] Step S10111: Determine whether the spot feature contour coincides with the preset reading and recognition area contour.
[0092] The reading and recognition area contour refers to the contour of the indication area in the water meter dial, which is determined in advance by technical personnel and will not be elaborated here.
[0093] Perform image analysis on the relative positions of the spot feature contour and the reading and recognition area contour to determine whether there is a coincidence between the two, so as to determine whether the spot feature affects the dial indication area.
[0094] Step S10112: When and only when there is a coincidence, control the preset camera to move and adjust to either the left or right side of the water meter at a preset offset angle to avoid the spot feature for image acquisition.
[0095] If there is no coincidence between the two, that is, the spot feature does not block the indication area in the instrument dial image, the system can normally acquire the image and collect the situation of the water meter at this time.
[0096] In this embodiment, the position of the camera is not fixed. The camera is installed on a slide rail that is installed around the water meter. The camera can slide on the slide rail, enabling the camera to change its position within a certain angle in the circumferential direction of the water meter, so as to be able to acquire the dial images in different directions of the water meter.
[0097] If it is found through the analysis of the instrument dial image that the contour of the light spot feature coincides with the contour of the pre-read identification area, the dial reading cannot be directly obtained at this time. The system adjusts the position of the camera, moving the camera to either the left or right side of the water meter for adjustment, and then performs image acquisition again. The light spot feature may move to a position outside the reading area on the dial, that is, the contour of the light spot feature and the contour of the reading identification area do not coincide. At this time, the system can normally perform image acquisition of the dial reading.
[0098] Step S1012: When the area of the light spot feature is greater than the reference reflective area, it is defined as full-angle partial reflection, and the circumferential acquisition and processing of the instrument dial image of the water meter are performed using a preset image stitching method.
[0099] When the area of the light spot feature is greater than the reference reflective area, no matter from which angle the camera shoots the water meter, a part of the contour of the reading identification area coincides with the contour of the light spot feature, causing the light spot feature to always block the dial reading. The camera cannot directly obtain the dial reading at a fixed position. For the above situation, the system controls the camera to perform circumferential acquisition and processing of the dial image using an image stitching method. The image stitching method will not be elaborated here and will be introduced in detail in subsequent embodiments.
[0100] Refer to Figure 2 , the image stitching method includes the following steps:
[0101] Step S200: Control the camera to move in the circumferential direction of the water meter along a preset circumferential movement path, and acquire circumferential instantaneous images during the movement.
[0102] The circumferential movement path is the path for the camera to move and adjust on the slide rail, which is preset by technicians in the system and will not be elaborated here.
[0103] The circumferential instantaneous image refers to the water meter dial image captured at any moment during the movement of the camera in the circumferential direction of the water meter. The camera continuously takes images during the movement, and the shooting angle of each image is different, and the relative position distribution of the contour of the light spot feature and the contour of the reading identification area is also different.
[0104] Step S201: Extract the dial data image from each circumferential instantaneous image according to the contour of the reading identification area.
[0105] The dial data image refers to an image that only includes the data within the contour of the reading and recognition area. The dial data image can be obtained by removing the images of the areas outside the contour of the reading and recognition area from the circumferential instantaneous image. If the contour of the light spot feature coincides with the contour of the reading and recognition area, there may still be a part of the light spot feature in the dial data image.
[0106] Step S202: Remove the light spot features from each dial data image according to the contour of the light spot feature to obtain a corrected dial image.
[0107] The corrected dial image refers to the image after removing the light spot features in the dial data image. Since the shooting angles of each corrected dial image are different, the data content in the corrected dial image reserved after removing the light spot features is also different.
[0108] Step S203: Stitch and combine all the corrected dial images to obtain a stitched dial image.
[0109] The stitched dial image refers to the image obtained by stitching all the corrected dial images after removing the light spot features. Since the content of each corrected dial image is different and each corrected dial image is equivalent to a fragment of the complete dial indication, stitching all the corrected dial images can restore the complete dial indication to the greatest extent, and it is also possible that a part of the image is missing and the complete dial indication cannot be obtained.
[0110] Step S204: Determine whether the water meter image is complete according to the stitched dial image and the preset reference dial image.
[0111] The reference dial image refers to the indication image of the complete water meter dial, which is pre-shot by technical personnel and will not be elaborated here.
[0112] By comparing and analyzing the stitched dial image obtained by stitching with the reference dial image, it is possible to determine whether there are differences between the two, so as to determine whether the stitched dial image is complete.
[0113] Step S205: Complete the image acquisition of the water meter if and only if the stitched dial image is complete.
[0114] If it is found that the stitched dial image is not complete when compared with the reference dial image, the system needs to perform image acquisition by other methods, and the specific method will not be elaborated here and will be introduced in detail in the subsequent embodiments.
[0115] If the stitched dial image is complete, the stitched dial image obtained by stitching is the final indication of the water meter dial, thus completing the image acquisition of the water meter.
[0116] Refer to Figure 3, when the stitched dial image obtained by the image stitching method is also incomplete, it indicates that the area of the light spot feature is relatively large, basically completely covering the water meter dial, making it impossible for the camera to directly capture and obtain. The processing method when the light spot feature completely covers the water meter dial includes the following steps:
[0117] In this embodiment, water sprayers are arranged at intervals in the circumferential direction of the water meter. Each water sprayer can spray water upward to form a water curtain above the water meter, and the water curtain can block and weaken the light directly irradiating on the water meter dial; the system numbers each water sprayer, and subsequently, the water sprayer can be individually controlled through the number of each water sprayer.
[0118] Step S300: Determine the position of the light spot feature based on the instrument dial image and the light spot feature.
[0119] The position of the light spot feature refers to the position of the light spot feature in the instrument dial image obtained by the camera at a fixed position. The position of the light spot feature can be determined by performing image recognition and analysis on the light spot feature in the instrument dial image.
[0120] Step S301: Determine the illumination direction of the light-emitting object based on the position of the light spot feature and the preset camera position.
[0121] The illumination direction of the light-emitting object refers to the direction in which the light source irradiates when a specular reflection phenomenon occurs on the water meter dial. The light-emitting object here can be the sun or any other object that can emit light and produce specular reflection on the dial. According to the principle of reflection, the incident angle is equal to the reflection angle. When the position of the light spot feature is determined, the angle of the reflection angle can be determined based on the position of the light spot feature and the camera position, thereby determining the angle of the incident angle and finally determining the illumination direction of the light-emitting object.
[0122] Step S302: Match the water sprayer number according to the illumination direction of the light-emitting object.
[0123] When the illumination direction of the light-emitting object is determined, a water curtain is set in the illumination direction of the light-emitting object, and the light is blocked or weakened by the water curtain. The water curtain at a specific position is formed by the water sprayed by the water sprayer at a specific position. Therefore, according to the illumination direction of the light-emitting object, it can be matched with the water sprayer number to determine the water sprayer that can produce a water curtain that blocks or weakens the light.
[0124] Step S303: Control the water sprayer according to the water sprayer number to spray water above the water meter in a preset intermittent spraying manner to form a water curtain to weaken the light, and obtain the image of the spraying moment when the water sprayer sprays water.
[0125] In this embodiment, in order to save water resources, the water spraying method of the water sprayer is an intermittent spraying method, that is, spraying water discontinuously. The time node of spraying water is determined by the time node of the camera collecting images. When the camera needs to collect the dial indication, the water sprayer sprays water synchronously.
[0126] The image at the water spraying moment refers to the image of the water meter obtained by the camera when the water sprayer sprays water, and the image contains the images of the water meter and the water curtain.
[0127] Step S304: Determine the position for obtaining the gap between the water curtain and the water meter according to the image at the water spraying moment.
[0128] When the water sprayer sprays water, a gap is formed between the water curtain and the water meter, and this gap can be used for the camera to collect the dial data. The position of this gap is the gap acquisition position. By performing image recognition and analysis on the image at the water spraying moment, the gap acquisition position can be determined.
[0129] Step S305: Control the camera to collect an image of the water meter dial at the gap acquisition position.
[0130] When using the method of blocking light with the water curtain, first conduct a water spraying test with the water sprayer to determine the gap acquisition position through the camera, and then turn on the water sprayer again and synchronously collect an image of the water meter dial from the gap acquisition position through the camera.
[0131] Refer to Figure 4 , the processing method when the light spot feature completely blocks the water meter dial further includes the following steps:
[0132] Step S400: Determine the brightness of the light spot feature according to the instrument dial image and the light spot feature.
[0133] The brightness of the light spot feature refers to the relative brightness value of the light spot feature in the instrument dial image. By performing image analysis on the light and dark gray levels of the light spot feature in the instrument dial image, the brightness of the light spot feature is determined.
[0134] Step S401: Determine the brightness reduction value according to the brightness of the light spot feature and the preset reference light spot brightness.
[0135] The reference light spot brightness refers to the brightness condition of the light spot when the camera can normally obtain the data inside the dial through the light spot feature. The reference light spot brightness is pre-determined by technical personnel and will not be elaborated here.
[0136] The brightness reduction value refers to the adjustment value when adjusting the brightness of the light spot feature, and the brightness reduction value is the difference between the brightness of the light spot feature and the reference light spot brightness.
[0137] Step S402: Match the instantaneous water spraying amount of the water sprayer according to the brightness reduction value.
[0138] The instantaneous water spray volume refers to the amount of water sprayed when the sprinkler sprays water to form a water curtain. The greater the instantaneous water spray volume, the thicker the water curtain, and the stronger the light attenuation effect. Therefore, the instantaneous water spray volume corresponds to the brightness attenuation value. The greater the brightness attenuation value, the greater the instantaneous water spray volume.
[0139] Step S403: When and only when the instantaneous water spraying volume of the sprinkler is not greater than the preset reference water consumption, the sprinkler is controlled to spray water according to the instantaneous water spraying volume, and the instrument dial image and day and night type are obtained, and the day and night type includes day and night.
[0140] The benchmark water consumption refers to the amount of water sprayed by the sprinkler set by the technicians to avoid wasting water resources. It will not be elaborated here. When the instantaneous water spraying volume is greater than the benchmark water consumption, it means that the use of sprinklers to spray water consumes too much water resources at this time, and it is not appropriate to use the method of spraying water to form a water curtain.
[0141] If the instantaneous water spraying volume of the sprinkler is not greater than the benchmark water consumption, it means that the sprinkler sprays a small amount of water each time. At this time, the sprinkler can spray water to form a water curtain that blocks the light.
[0142] In this embodiment, when the water curtain blocks the light, although the brightness of the reflected light spot can be reduced, the overall brightness of the dial will also be reduced, which may also affect the camera's data collection. The system first obtains the instrument dial image, and then adjusts the fill light for the above situation based on the impact of daytime and nighttime on the image.
[0143] The day and night types can be obtained through photosensors.
[0144] Step S4031: Based on the night, determine the brightness of the water meter dial according to the instrument dial image.
[0145] The water meter dial brightness refers to the brightness of the dial when the water curtain blocks the light. The water meter dial brightness can be obtained by image recognition and analysis of the instrument dial image.
[0146] Step S40311: When the water meter dial brightness is less than the preset collection brightness, the preset dial auxiliary light is controlled to provide auxiliary lighting for the dial.
[0147] The acquisition brightness refers to the brightness of the dial when the camera can normally acquire the data on the dial. The acquisition brightness is pre-determined by the technicians and will not be elaborated here.
[0148] When the brightness of the water meter dial is not less than the acquisition brightness, it means that the brightness of the dial is still high after the light spot feature is weakened, and the camera can still normally collect images of the data on the dial.
[0149] If the brightness of the water meter dial is less than the acquisition brightness, it indicates that after the spot characteristics are weakened, the brightness of the dial is also weakened synchronously, so that the camera cannot directly obtain the data inside the dial. In this embodiment, auxiliary lights are arranged circumferentially on the dial. When the brightness of the water meter dial is low, the auxiliary lights can be turned on to increase the brightness of the water meter dial.
[0150] Referring to Figure 5 , during the day, the effect of the auxiliary lights is not obvious and it consumes electricity, so other methods are used for supplementary lighting. The brightness compensation method for the water meter instrument dial in the daytime includes the following steps:
[0151] Step S4032: Based on daytime, obtain the direction of sunlight.
[0152] The direction of sunlight refers to the direction of sunlight irradiation. A photosensitive sensor is integrated on the water meter, and the photosensitive sensor can detect the sunlight intensity in all directions of the water meter to determine the direction with the maximum light intensity, and this direction is the direction of sunlight.
[0153] Step S40321: Determine the theoretical reflection position of the preset theoretical reflection surface that can scatter sunlight to the water meter dial according to the direction of sunlight.
[0154] In this embodiment, a water curtain for blocking or weakening the light of the light-emitting object is formed by spraying water with a sprinkler, and at the same time, a water curtain for scattering sunlight to illuminate the water meter dial is formed by spraying water with other sprinklers, and the position of this water curtain is the theoretical reflection position. The theoretical reflection surface is a reflection surface obtained by theoretical calculation that can scatter sunlight to the water meter dial.
[0155] The corresponding theoretical reflection position can be analyzed according to the direction of sunlight and the position of the water meter.
[0156] Step S40322: Match the sprinkler numbers according to the theoretical reflection position.
[0157] When the theoretical reflection position is determined, the sprinkler numbers that can form a water curtain at the theoretical reflection position can also be matched and determined.
[0158] Step S40323: Control the sprinklers to spray water according to the sprinkler numbers to form a water curtain at the theoretical reflection position to scatter sunlight to the water meter dial to increase the brightness of the dial.
[0159] When the corresponding sprinkler numbers are determined, control the sprinklers with the corresponding sprinkler numbers to spray water to form a water curtain on one side of the water meter that can scatter sunlight to the water meter dial. The way of spraying water by this sprinkler is also an intermittent spraying method. At this time, when image acquisition is performed by the camera, there are two water curtains circumferentially on the water meter. One water curtain is used to block the light of the light-emitting object, and the other water curtain is used to scatter sunlight to illuminate the water meter dial.
[0160] In this embodiment, the light-emitting object can also be the sun. In this case, the two water curtains do not interfere with each other.
[0161] Referring to Figure 6 , the light-shielding cover control method includes the following steps:
[0162] In this embodiment, when the external light is strong, the form of the water curtain cannot effectively reduce the light. At this time, the light is blocked by the light-shielding cover arranged on the water meter. The light-shielding cover is rotatably arranged on the water meter and can adjust its circumferential position and opening / closing angle on the water meter.
[0163] Step S500: Obtain the shadow image of the light-shielding cover.
[0164] The shadow image of the light-shielding cover refers to the image of the shadow generated when the light-emitting object irradiates the light-shielding cover at its initial position. The shadow image is obtained by shooting with a camera.
[0165] Step S501: Analyze the shadow image to determine the shadow orientation and the shadow elongation length.
[0166] Both the shadow orientation and the shadow elongation length are parameters of the shadow of the light-shielding cover. The shadow orientation refers to the direction of the shadow, and the shadow elongation length refers to the length of the shadow. Both the shadow orientation and the shadow elongation length can be obtained by analyzing the shadow image.
[0167] Step S502: Determine the bright spot light source orientation according to the preset light-shielding cover size parameters, shadow orientation, and shadow elongation length.
[0168] The bright spot light source orientation refers to the position of the light-emitting object that reflects light on the water meter dial and irradiates the light-shielding cover to generate a shadow.
[0169] When the shadow orientation and the shadow elongation length are determined, by comparing and calculating the parameters of the shadow and the actual light-shielding cover size parameters, the bright spot light source orientation can be calculated.
[0170] Step S503: Determine the light-shielding cover blocking position according to the bright spot light source orientation.
[0171] The light-shielding cover blocking position refers to the position of the light-shielding cover on the water meter when the light-emitting object is blocked by the light-shielding cover. When the bright spot light source orientation is determined, the light-shielding cover blocking position is located between the bright spot light source orientation and the spot characteristics.
[0172] Step S504: Determine the rotation angle of the light-shielding cover according to the preset initial position and the light-shielding cover blocking position.
[0173] The rotation angle of the light-shielding cover refers to the angle required to rotate the light-shielding cover from the initial position to the light-shielding cover blocking position.
[0174] Step S505: Rotate the light-shielding cover from the initial position to the light-shielding position according to the rotation angle of the light-shielding cover, and determine whether there is a preset light-shielding cover feature in the instrument dial image according to the instrument dial image.
[0175] By rotating the light-shielding cover to the light-shielding position, the light-shielding cover may block the water meter dial at this time, making it impossible for the camera to collect images normally. Therefore, it is necessary to determine whether the above situation will occur. By identifying the light-shielding cover feature from the instrument dial image, if there is no light-shielding cover feature, it means that the light-shielding cover does not block the water meter dial.
[0176] Step S506: When there is a light-shielding cover feature in the instrument dial image, determine whether the light-shielding cover blocks the water meter dial according to the light-shielding cover feature and the contour of the reading and recognition area.
[0177] When the light-shielding cover feature blocks the water meter dial, if the light-shielding cover feature is located outside the indicated area on the dial, the camera can still normally collect the data in the indicated area. Therefore, the relative position between the light-shielding cover feature and the contour of the reading and recognition area is identified again to determine whether there is an overlap between the two, so as to determine whether the light-shielding cover blocks the water meter dial.
[0178] Step S507: Complete the image acquisition of the water meter dial if and only if the light-shielding cover does not block the water meter dial.
[0179] If the light-shielding cover does not block the water meter dial, the camera can normally collect the image of the water meter dial.
[0180] If the light-shielding cover blocks the water meter dial, the light-shielding cover needs to be processed. The specific processing method will not be elaborated here and will be introduced in detail in the subsequent embodiments.
[0181] Refer to Figure 7 , the processing method when the light-shielding cover is in the light-shielding position and blocks the water meter dial includes the following steps:
[0182] For the situation where the light-shielding cover will block the water meter dial when it is in the light-shielding position, in this embodiment, a lens is provided on the side of the light-shielding cover facing the water meter dial. When the light-shielding cover is adjusted to a suitable angle, the camera can obtain the image of the water meter dial from the lens.
[0183] Step S600: When the light-shielding cover blocks the water meter dial, determine the angle range of the light-shielding cover according to the preset camera position, the preset dial position and the contour of the reading and recognition area.
[0184] The shading cover angle range refers to the angle range of the shading cover when the camera can obtain the data within the complete contour of the reading and recognition area from the lens of the shading cover at a fixed position. The shading cover angle range can be determined according to the relative position relationship among the camera position, the dial position, and the contour of the reading and recognition area. When the shading cover is set at any angle position within the shading cover angle range, the camera can obtain complete data from the lens. The only difference between different shading cover angle ranges lies in the position of the contour of the reading and recognition area in the lens.
[0185] Step S601: Select the middle angle position from the shading cover angle range.
[0186] The middle angle position is the middle value of the shading cover angle range. When the shading cover is at the middle angle position, the contour of the reading and recognition area is at the center position of the lens, which is convenient for the camera to collect and obtain.
[0187] Step S602: Control the shading cover to rotate from the shading cover blocking position to the middle angle position, and control the camera to collect images of the lens on the shading cover to obtain a reverse dial image.
[0188] The reverse dial image refers to the image of the dial obtained by the camera from the lens of the shading cover.
[0189] When the shading cover at the shading cover blocking position affects the normal acquisition of the dial image by the camera, the system rotates the shading cover to the middle angle position. At this time, the system can control the camera to collect the data image of the water meter dial from the lens of the shading cover.
[0190] Step S603: Perform an inversion process on the reverse dial image and output a corrected dial image.
[0191] Since the reverse dial image obtained from the lens is an inverted image, the system needs to invert the reverse dial image in order to obtain a normal corrected dial image.
[0192] Refer to Figure 8 , when the camera collects images through the lens, it is easily damaged by strong light in the lens. The protection method for the camera includes the following steps:
[0193] Step S700: Determine the light source reflection position according to the camera position and the middle angle position.
[0194] The light source reflection position refers to the position of the reflected light source that can enter the camera and be captured by the camera after being reflected by the lens of the shading cover. According to the principle of light reflection, the light source reflection position can be determined according to the camera position and the middle angle position.
[0195] Step S701: Determine the theoretical shadow state of the light-shielding cover based on the light source reflection position, the intermediate angle position, and the light-shielding cover size parameters.
[0196] The theoretical shadow state of the light-shielding cover refers to the state of the shadow generated by the light-shielding cover under the illumination of the light source at the light source reflection position. Based on the relative position relationship between the light source reflection position and the intermediate angle position and combined with the light-shielding cover size parameters, the theoretical shadow state of the light-shielding cover can be determined.
[0197] Step S702: Determine whether the shadow image of the light-shielding cover is consistent with the theoretical shadow state of the light-shielding cover.
[0198] When the camera collects an image of the dial in the lens of the light-shielding cover, it always synchronously collects the shadow image of the light-shielding cover. By determining whether the shadow image of the light-shielding cover is consistent with the theoretical shadow state of the light-shielding cover, it is determined whether strong light will be generated in the lens and affect the camera.
[0199] Step S703: When and only when the shadow image of the light-shielding cover is consistent with the theoretical shadow state of the light-shielding cover, determine the maximum adjustment angle according to the light-shielding cover angle range.
[0200] If the shadow image of the light-shielding cover is consistent with the theoretical shadow state of the light-shielding cover, it means that there is a strong light source at the light source reflection position that will affect the camera. At this time, the light-shielding cover is adjusted within the light-shielding cover angle range so that the strong light source at the light source reflection position will not be reflected to the camera.
[0201] The maximum adjustment angle refers to the maximum angle that the light-shielding cover can be adjusted within the light-shielding cover angle range. When the light-shielding cover is adjusted within the light-shielding cover angle range, the camera can obtain an image of the dial from the lens. When the light-shielding cover is adjusted at the maximum adjustment angle, the strong light reflected by the strong light source at the light source reflection position through the lens can be offset by a relatively large distance from the camera.
[0202] Step S704: Rotate and adjust the light-shielding cover according to the maximum adjustment angle.
[0203] When the maximum adjustment angle is determined, the system controls the light-shielding cover to rotate and adjust. At this time, the camera can still collect an image of the dial from the lens of the light-shielding cover, and the strong light source at the light source reflection position is not likely to reflect the light source to the camera.
[0204] Based on the same inventive concept, an embodiment of the present invention provides a light reflection processing system for a water meter based on image acquisition.
[0205] A light reflection processing system for a water meter based on image acquisition includes the following modules:
[0206] An acquisition module, configured to acquire an instrument dial image, a circumferential instantaneous image, an image of the water spraying moment when the water sprinkler sprays water, the day / night type, the solar illumination direction, and a shadow image of the light-shielding cover.
[0207] A memory, configured to store a program of a light reflection processing method for a water meter based on image acquisition.
[0208] A processor, the program in the memory can be loaded and executed by the processor and implement a light reflection processing method for a water meter based on image acquisition.
[0209] Based on the same inventive concept, an embodiment of the present invention provides a terminal, including a memory and a processor, and a computer program capable of being loaded and executed by the processor and implementing a light reflection processing method for a water meter based on image acquisition is stored on the memory.
[0210] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions within the idea of the present invention belong to the protection scope of the present invention. It should be pointed out that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for processing reflection of a water meter based on image acquisition, characterized in that: include: Get the instrument panel image; Determine the light spot characteristic area according to the instrument panel image and the preset light spot characteristics; When the characteristic area of the light spot is not larger than the preset reference reflective area, it is defined as a specific angle reflection, and the characteristic profile of the light spot is determined based on the instrument surface image and the light spot characteristics; Determine whether the characteristic contour of the light spot overlaps with the preset reading and recognition area contour; If and only if there is overlap, control the preset camera to move and adjust to either the left or right side of the water meter at a preset offset angle to avoid the light spot feature for image acquisition; When the characteristic area of the light spot is larger than the reference reflective area, it is defined as full-angle partial reflection, and the instrument dial image of the water meter is circumferentially collected and processed using a preset image stitching method.
2. The method for processing reflection of a water meter based on image acquisition according to claim 1, characterized in that: Image stitching methods include: Control the camera to move around the water meter along a preset circumferential moving path, and acquire circumferential instantaneous images during the movement; Extracting a dial data image from each circumferential instantaneous image according to the read recognition area contour; The light spot feature is removed from each dial data image according to the light spot feature profile to obtain a corrected dial image; All corrected dial images are combined and stitched together to obtain a stitched dial image; Determine whether the water meter image is complete according to the spliced dial image and the preset reference dial image; The image acquisition of the water meter is completed when and only when the spliced dial image is complete.
3. The method for processing reflection of a water meter based on image acquisition according to claim 1, characterized in that: Sprinklers are arranged at intervals around the water meter, and each sprinkler is numbered. Each sprinkler can spray water above the water meter to form a water curtain; The processing methods when the light spot feature completely blocks the water meter dial include: Determine the light spot feature position according to the instrument dial image and the light spot feature; Determine the irradiation direction of the light object according to the characteristic position of the light spot and the preset camera position; Match the sprinkler number according to the direction of the luminous object; According to the sprinkler number, the sprinkler is controlled to spray water above the water meter in a preset intermittent spraying mode to form a water curtain to reduce the light, and an image of the spraying time when the sprinkler sprays water is obtained; Determine the gap between the water curtain and the water meter and obtain the position according to the image at the time of water spraying; The camera is controlled to acquire images of the water meter dial at the gap acquisition position.
4. The method for processing reflection of a water meter based on image acquisition according to claim 3, characterized in that: Also includes: Determine the characteristic brightness of the light spot according to the instrument dial image and the light spot characteristics; Determine the brightness reduction value according to the characteristic brightness of the light spot and the preset reference brightness of the light spot; Match the instantaneous water spraying volume of the sprinkler according to the brightness reduction value; When and only when the instantaneous water spraying volume of the sprinkler is not greater than the preset reference water consumption, the sprinkler is controlled to spray water according to the instantaneous water spraying volume, and an instrument dial image and a day and night type are obtained, where the day and night type includes day and night; Based on the night, the water meter dial brightness is determined according to the instrument dial image; When the water meter dial brightness is lower than the preset collection brightness, the preset dial auxiliary light is controlled to provide auxiliary lighting for the dial.
5. The method for processing reflection of a water meter based on image acquisition according to claim 4, characterized in that: The brightness compensation methods of the water meter dial under daytime conditions include: Based on daylight, get the direction of sunlight; Determine the theoretical reflection position of a preset theoretical reflection surface capable of scattering sunlight to the water meter dial according to the direction of sunlight; Match the sprinkler number according to the theoretical reflection position; The sprinklers are controlled to spray water according to the sprinkler numbers to form a water curtain at the theoretical reflection position to scatter sunlight to the water meter dial to increase the brightness of the dial.
6. The method for processing reflection of a water meter based on image acquisition according to claim 1, characterized in that: A light shielding cover is provided on the water meter to shield the reflective light spot. The light shielding cover control method includes: Obtain a shadow image of the light shielding cover; Determine the shadow orientation and shadow elongation length based on shadow image analysis; Determine the bright spot light source orientation according to preset shading cover size parameters, shadow orientation and shadow elongation length; Determine the shielding position of the shading cover according to the orientation of the bright spot light source; Determining the rotation angle of the shading cover according to the preset initial position and the shading cover shielding position; The shading cover is rotated from an initial position to a shading cover blocking position according to a shading cover rotation angle, and whether a preset shading cover feature exists in the instrument dial image according to the instrument dial image; When there is a light shielding cover feature in the instrument dial image, it is determined whether the light shielding cover blocks the water meter dial according to the light shielding cover feature and the read recognition area contour; The image acquisition of the water meter dial is completed when and only when the shading cover does not block the water meter dial.
7. The method for processing reflection of a water meter based on image acquisition according to claim 6, characterized in that: A lens is provided on the shading cover; a method for handling when the shading cover is in the shading cover shielding position and shields the water meter dial includes: When the shading cover blocks the water meter dial, the shading cover angle range is determined according to the preset camera position, the preset dial position and the read recognition area contour; Select an intermediate angle position from the range of shading cover angles; Control the shading cover to rotate from the shading cover blocking position to the middle angle position, and control the camera to collect images of the lens on the shading cover to obtain a reverse dial image; The reverse dial image is inverted and the corrected dial image is output.
8. The method for processing reflection of a water meter based on image acquisition according to claim 7, characterized in that: When the camera collects images through the lens, it is easy to be affected by the strong light in the lens and damage the components. The protection methods for the camera include: Determine the light source reflection position according to the camera position and the intermediate angle position; Determine the theoretical shadow state of the light shielding cover according to the reflection position of the light source, the middle angle position and the size parameters of the light shielding cover; Determine whether the shadow image of the shading cover is consistent with the theoretical shadow state of the shading cover; If and only if the shadow image of the shading cover is consistent with the theoretical shadow state of the shading cover, the maximum adjustment angle is determined according to the shading cover angle range; Rotate the shading cover to adjust the maximum adjustment angle.
9. A water meter reflection processing system based on image acquisition, characterized in that: include: An acquisition module is used to acquire an instrument dial image, a circumferential instantaneous image, an image of the water spraying moment when the sprinkler sprays water, a day and night type, a sunlight direction, and a shadow image of a sunshade cover; A memory, used to store a program of a method for processing reflection of a water meter based on image acquisition according to any one of claims 1 to 8; The program in the memory can be loaded and executed by the processor to implement a reflection processing method of a water meter based on image acquisition.
10. A terminal, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and executes a method for processing reflection of a water meter based on image acquisition as claimed in any one of claims 1 to 8.