CN116558718A - Indoor water leakage detection method, device, terminal equipment and readable storage medium - Google Patents

Indoor water leakage detection method, device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN116558718A
CN116558718A CN202310481056.2A CN202310481056A CN116558718A CN 116558718 A CN116558718 A CN 116558718A CN 202310481056 A CN202310481056 A CN 202310481056A CN 116558718 A CN116558718 A CN 116558718A
Authority
CN
China
Prior art keywords
temperature
water leakage
area
image
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310481056.2A
Other languages
Chinese (zh)
Inventor
朱文勇
张琨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202310481056.2A priority Critical patent/CN116558718A/en
Publication of CN116558718A publication Critical patent/CN116558718A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M3/00Investigating fluid-tightness of structures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J5/48Thermography; Techniques using wholly visual means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J5/48Thermography; Techniques using wholly visual means
    • G01J5/485Temperature profile
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A20/00Water conservation; Efficient water supply; Efficient water use

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)

Abstract

The application relates to the technical field of image processing and discloses an indoor water leakage detection method, an indoor water leakage detection device, terminal equipment and a readable storage medium, wherein the method comprises the following steps: acquiring an original infrared temperature array of a region to be detected based on an infrared device; preprocessing the original infrared temperature array to obtain a preprocessed temperature array; performing image processing on an original temperature image formed by the preprocessing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area to obtain a temperature processing image; detecting whether a target area meeting a preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected. The method is based on the original infrared temperature data and combined with software image processing and the like, can realize indoor water leakage detection, and has higher accuracy and the like.

Description

Indoor water leakage detection method, device, terminal equipment and readable storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an indoor water leakage detection method, an indoor water leakage detection device, a terminal device, and a readable storage medium.
Background
In some indoor environments such as a machine room, if water leakage occurs, certain harm is brought to indoor equipment, so that whether the water leakage phenomenon occurs or not needs to be detected regularly. The current proposal mainly takes photos through a traditional color camera to obtain indoor color photos for manual or automatic judgment.
However, in the actual water leakage detection process, at least the following problems exist that for water leakage on the ground, the imaging difference is large due to the fact that some ground reflects light of ambient light or the like or the angle of a camera is different, so that accumulated water cannot be found in time in an image; in addition, the water has colorless and transparent properties, so that accumulated water cannot be well presented in the image, the detection difficulty is increased, and the like.
Disclosure of Invention
In view of this, the embodiments of the present application provide an indoor water leakage detection method, apparatus, terminal device, and readable storage medium, which can effectively solve the problem of low accuracy existing in the conventional water leakage detection method.
In a first aspect, an embodiment of the present application provides an indoor water leakage detection method, including:
acquiring an original infrared temperature array of a region to be detected based on an infrared device;
preprocessing the original infrared temperature array to obtain a preprocessed temperature array;
performing image processing on an original temperature image formed by the preprocessing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area to obtain a temperature processing image;
detecting whether a target area meeting a preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected.
In some embodiments, the image processing of the raw temperature image formed by the pre-processing temperature array based on the temperature difference characteristics of the water-leaking region and the non-water-leaking region includes:
performing gradient calculation on an original temperature image formed by the preprocessing temperature array to obtain a gradient image, wherein the gradient image is used for reflecting the temperature difference between each pixel point and surrounding pixels;
performing binarization processing on the gradient image based on a temperature difference threshold value of the water leakage area and the non-water leakage area to obtain a binarized image;
and carrying out morphological processing on the binarized image to obtain the temperature processing image.
In some embodiments, the morphologically processing the binarized image comprises:
and performing an open operation of firstly corroding and then expanding on the binary image.
In some embodiments, the pre-processing the raw infrared temperature array to obtain a pre-processed temperature array comprises:
according to the indoor environment temperature range of the area to be detected, temperature extreme values in the original infrared temperature array are screened out, and then data smoothing processing is carried out to obtain a preprocessing temperature array; wherein the temperature extremum comprises an extremely high temperature value and/or an extremely low temperature value.
In some embodiments, the data smoothing process includes a gaussian filter or median filter process.
In some embodiments, the detecting whether a target area satisfying a preset contour condition exists in the temperature processing image includes:
extracting all contours in the temperature processing image, and calculating the area of each contour;
and when the area of one contour is larger than the preset area lower limit value and smaller than the area upper limit value, determining an area formed by the contour as a target area until all contours are detected.
In some embodiments, the area to be detected is any one of an indoor floor area, an air conditioner air outlet area, and an air conditioner pipeline area.
In a second aspect, an embodiment of the present application provides an indoor water leakage detection device, including:
the temperature acquisition module is used for acquiring an original infrared temperature array of the region to be detected based on the infrared device;
the data preprocessing module is used for preprocessing the original infrared temperature array to obtain a preprocessed temperature array;
the image processing module is used for performing image processing on an original temperature image formed by the preprocessing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area so as to obtain a temperature processing image;
the water leakage judging module is used for detecting whether a target area meeting the preset contour condition exists in the temperature processing image or not, and taking the existing target area as a water leakage area in the area to be detected.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the indoor water leakage detection method.
In some embodiments, the terminal device is a patrol robot.
In a fourth aspect, embodiments of the present application provide a readable storage medium storing a computer program that, when executed on a processor, implements the indoor water leakage detection method.
The embodiment of the application has the following beneficial effects:
according to the indoor water leakage detection method, an original infrared temperature array of a region to be detected is obtained based on an infrared device; then, preprocessing the original infrared temperature array to obtain a preprocessed temperature array; further, image processing is carried out on an original temperature image formed by the pre-processing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area so as to obtain a temperature processing image; and finally, detecting whether a target area meeting the preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic structural diagram of a terminal device according to an embodiment of the present application;
FIG. 2 shows a flow chart of an indoor water leakage detection method according to an embodiment of the present application;
FIG. 3 shows a gray scale map corresponding to an RGB color image based on a color camera;
FIG. 4 shows another flow chart of an indoor water leakage detection method according to an embodiment of the present application;
FIG. 5 shows a schematic diagram of a partial raw infrared temperature array of an embodiment of the present application;
FIGS. 6 (a) -6 (d) are schematic diagrams respectively showing corresponding temperature images obtained by the indoor water leakage detection method according to the embodiment of the present application;
fig. 7 is a schematic structural view of an indoor water leakage detection device according to an embodiment of the present application.
Description of main reference numerals:
100-an indoor water leakage detection device; 110-a temperature acquisition module; 120-a data preprocessing module; 130-an image processing module; 140-a water leakage judging module; 10-terminal equipment; 11-an infrared device; 12-memory; 13-processor.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments.
The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In the following, the terms "comprises", "comprising", "having" and their cognate terms may be used in various embodiments of the present application are intended only to refer to a particular feature, number, step, operation, element, component, or combination of the foregoing, and should not be interpreted as first excluding the existence of or increasing the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of this application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is identical to the meaning of the context in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The embodiments described below and features of the embodiments may be combined with each other without conflict.
Because the indoor water leakage detection scheme based on the traditional color camera has the problems that accumulated water cannot be found in time and the detection accuracy is low, the application provides an infrared device-based indoor water leakage detection method. Through practical tests, the method can achieve the water leakage detection accuracy of more than 98%, does not need to modify the hardware structure of terminal equipment (such as a patrol robot, etc.), does not need to be installed and maintained in a power failure, and does not bring any potential safety hazard.
The method for detecting indoor water leakage will be described with reference to specific examples.
As shown in fig. 1, the present application provides a terminal device 10, for example, the terminal device 10 may be a patrol robot in various forms, or may be other devices with an infrared device 11 or an infrared sensor array, etc. for performing water leakage detection on various areas where water leakage may occur, such as an indoor floor, an air conditioner air outlet, or an air conditioner pipeline, etc. by using the indoor water leakage detection method of the present application.
The terminal device 10 comprises, for example, an infrared means 11, a memory 12 and a processor 13. Wherein the infrared device 11 is used for acquiring original infrared temperature data, the memory 12 stores a computer program, and the processor 13 runs the computer program, so that the terminal device 10 executes the indoor water leakage detection method or each functional module in the indoor water leakage detection device 100.
In one embodiment, infrared device 11 may include, but is not limited to, an infrared sensor, an array of infrared sensors, an infrared camera, etc., the form of its presence is not particularly limited.
Taking the inspection robot as an example, the inspection robot can be used for various indoor environments to automatically inspect whether the indoor water leakage exists or not, and further warning and the like in time when the water leakage exists is judged, and particularly the indoor environments such as a data center machine room, a power distribution machine room and an equipment machine room need to be monitored at fixed time so as to avoid the occurrence of safety problems due to the water leakage. In one embodiment, the inspection robot includes a holder, for example, the infrared device 11 may be disposed on at least one side of the holder, such as the top of the housing of the robot, and further optionally, the infrared device 11 may be disposed on the front end of the top of the housing, so as to increase the detection range to some extent, in consideration of the height of the holder and the detection range of the infrared device 11. Of course, the cradle head can also be a lifting structure, so that the detection view field of the infrared device can be adjusted. It can be understood that in the inspection process, the inspection robot can drive the infrared device 11 to detect at different angles through rotation of the cradle head, so as to perform comprehensive inspection on different corners in a room.
The Memory 12 may be, but is not limited to, a random access Memory 12 (Random Access Memory, RAM), a Read Only Memory 12 (ROM), a programmable Read Only Memory 12 (Programmable Read-Only Memory, PROM), an erasable Read Only Memory 12 (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory 12 (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. Wherein the memory 12 is adapted to store a computer program which, upon receipt of an execution instruction, is executable by the processor 13 accordingly.
The processor 13 may be an integrated circuit chip with signal processing capabilities. The processor 13 may be a general purpose processor 13 including at least one of a central processing unit 13 (Central Processing Unit, CPU), a graphics processor 13 (Graphics Processing Unit, GPU) and a network processor 13 (Network Processor, NP), a digital signal processor 13 (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The general purpose processor 13 may be the microprocessor 13 or the processor 13 may be any conventional processor 13 or the like that may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application.
The terminal device 10 having the above-described structure will be described in detail as follows.
Fig. 2 shows a flowchart of an indoor water leakage detection method according to an embodiment of the present application. The indoor water leakage detection method exemplarily comprises the following steps:
s110, acquiring an original infrared temperature array of the region to be detected based on the infrared device.
In the present application, the terminal device 10 for water leakage detection acquires the original infrared temperature data of the specified location area to be detected through the infrared device 11, and it should be understood that the original infrared temperature data acquired in the present application refers to the original temperature data acquired through the infrared device 11 and not subjected to color rendering or other processing, and is usually stored in an array or array form.
It is particularly noted that, instead of performing subsequent processing using an infrared color image output by the infrared device 11, such as an RGB image (for example, fig. 3 shows a gray scale image corresponding to one RGB color image), a YUV image, or an HSV image, the present application directly performs temperature data processing on an original infrared temperature array, and then converts the temperature data into an image format to obtain an original temperature image that is not rendered as a basis for the subsequent processing. This is because, when the color infrared image shown in fig. 3 is used for processing, since different manufacturers may render the same temperature with different colors, a single-channel image which cannot accurately represent the temperature is easily obtained when single-channel separation or color separation is performed, and thus the final water leakage detection result is affected.
For example, when water leakage detection is required in a designated area, the terminal device 10 may be moved to a corresponding position and the infrared device 11 may be turned on to perform an original temperature data acquisition operation. For example, if the terminal device 10 is a patrol robot, the water leakage detection can be sequentially performed on each area to be detected in the middle according to a preset patrol path, so as to perform water leakage alarm and the like, and the workload of manual periodical checking and maintenance and the like can be greatly reduced. In addition, an automatic timing inspection task can be set for the inspection robot, so that the infrared device 11 is triggered to acquire the infrared temperature of the corresponding area every time the inspection time point is reached, and further analysis processing of water leakage detection is performed.
S120, preprocessing the original infrared temperature array to obtain a preprocessed temperature array.
For example, the preprocessing mainly includes filtering the temperature extremum and smoothing the temperature data, so that the obtained raw infrared temperature data can be more uniform and conform to the actual temperature scene.
Exemplary, as shown in fig. 4, after the original infrared temperature array is obtained, the temperature extremum in the original infrared temperature array may be screened according to the indoor environment temperature where the area to be detected is located, where the temperature extremum may include an extremely high temperature value and/or an extremely low temperature value. Then, the filtered temperature array is subjected to data smoothing processing. For example, the smoothing process may be performed by means of gaussian filtering, median filtering, etc. to eliminate noise in the raw data, so as to obtain the above-mentioned preprocessing temperature array.
It will be appreciated that for each temperature value in the temperature array, the highest temperature value and the lowest temperature value collected should typically be within the indoor ambient temperature range since the region is located in the indoor environment. The environmental temperature range here may be set accordingly in consideration of the slightly lower temperature in the case of water leakage. Therefore, by carrying out extreme temperature screening, the influence of other external objects, such as light, heating equipment and the like, can be filtered, the rationality of the original temperature data can be ensured, the accuracy can be improved and the like.
And S130, performing image processing on the original temperature image formed by the pre-processing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area to obtain a temperature processing image.
In general, when water leaks in a location area, a certain temperature difference exists between the temperature of the location of the leaking area and the temperature of the location of the area without water leakage due to the existence of water, so that the application combines the characteristic of the water leakage area and the temperature of the location of the area without water leakage to perform corresponding image processing on an unrendered original temperature image obtained by converting the pre-processing temperature array according to an image format so as to determine whether water leakage exists.
In one embodiment, in combination with fig. 4 above, step S130 includes the following sub-steps:
firstly, carrying out gradient calculation on an original temperature image formed by the pretreatment temperature array to obtain a gradient image; then, carrying out binarization processing on the gradient image based on the temperature difference threshold value of the water leakage area and the non-water leakage area to obtain a binarized image; and finally, carrying out morphological processing on the binarized image to obtain a temperature processing image.
The gradient calculation described above is exemplarily embodied by calculating a temperature difference between each pixel point in the original temperature image and surrounding pixels to obtain a gradient image for reflecting the temperature difference between each pixel point and surrounding pixels. For example, the surrounding pixels may be eight adjacent pixels surrounding the current pixel, and the average temperature value of the eight pixels may be used for calculating the temperature difference between the eight adjacent pixels and the current pixel, and of course, more adjacent pixels may be selected as the surrounding pixels, which is not limited herein, and may be specifically selected according to practical requirements.
In general, the temperature difference threshold between the water-leaking region and the non-water-leaking region in the room may be about 2 to 3 degrees, and based on this, the gradient image may be divided, for example, the gray value of the pixel whose temperature difference is greater than the threshold is 255, and the gray value of the pixel whose temperature difference is equal to or less than the threshold is 0, or vice versa, so that a corresponding binary image may be obtained.
For example, the morphological processing described above may include performing an open operation of etching before dilation on the binarized image to obtain a processed image containing the corresponding contours. It can be understood that through morphological processing of open operation, isolated small points, burrs and the like existing in the binary image can be removed, so that the overall position and shape of the outline in the image are not changed, and subsequent water leakage judgment and the like are facilitated.
Through the series of image processing, the water leakage area in the original temperature image formed based on the preprocessing temperature array can be more obvious, so that the detection accuracy rate and the like are improved.
S140, detecting whether a target area meeting a preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected.
Finally, after the temperature-treated image is obtained, a determination as to whether each region surrounded by the outline in the image is a water leakage region can be made. The above-mentioned predetermined profile condition mainly refers to whether the area size of the profile is within a predetermined area range, and generally, when the area of a certain profile is larger than the lower limit value and smaller than the upper limit value of the predetermined area range, the condition is satisfied, otherwise, the condition is not satisfied.
Illustratively, as shown in FIG. 4, all contours in the temperature-processed image may be extracted and the area of each contour calculated. For each contour, it is detected whether the area size is greater than a preset area lower limit and less than an area upper limit. If so, determining the area formed by the current outline as a target area, and taking the target area as a water leakage area. If not, continuing to detect the next contour until all contours are detected, thereby finding out all water leakage areas.
In order to better understand the processing result obtained in each time in the above method, taking a scene of a certain practical machine room and using a patrol robot to perform water leakage detection as an example, first, an original infrared temperature array of a specified area is obtained by the patrol robot, and as shown in fig. 5, an array schematic diagram including local temperatures is shown. Further, after extremum screening and smoothing, the temperature image is converted into an image format to obtain an original temperature image (not shown); further, the gradient processing is performed to obtain a gradient image as shown in fig. 6 (a), then the image binarization processing is performed to obtain a binarized image as shown in fig. 6 (b), and finally the morphological processing by the on operation is performed to obtain a morphological processed image as shown in fig. 6 (c). Then, whether each contour in the processed image meets the requirement can be judged through the contour area size, so that whether the contour is a water leakage area or not can be determined, and the four ground water leakage areas marked by circles in fig. 6 (d) are shown.
According to the indoor water leakage detection method, the original infrared temperature data are obtained through the infrared device, data screening, smoothing and the like are carried out on the original infrared temperature data, a series of software image layers such as gradient, binarization and morphology are carried out on the corresponding original temperature image, a processed image with more obvious water leakage area characteristics is obtained, and therefore high-accuracy water leakage area detection operation is achieved. Compared with the traditional scheme for detecting water leakage based on a color camera, the method can effectively solve the problem that light reflection or water imaging is not obvious, improves the water leakage detection effect, does not need any improvement of equipment hardware structure, and has better movable value and compatibility for some scenes with limited hardware structures.
Fig. 7 is a schematic view showing a structure of the indoor water leakage detecting device 100 according to the embodiment of the present application. The indoor water leakage detecting device 100 exemplarily includes:
the temperature acquisition module 110 is configured to acquire an original infrared temperature array of the area to be detected based on the infrared device.
The data preprocessing module 120 is configured to preprocess the raw infrared temperature array to obtain a preprocessed temperature array.
And the image processing module 130 is configured to perform image processing on the original temperature image formed by the pre-processing temperature array based on the temperature difference characteristic of the water leakage area and the non-water leakage area, so as to obtain a temperature processing image.
And the water leakage judging module 140 is used for detecting whether a target area meeting a preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected.
Further, the data preprocessing module 120 includes a screening sub-module and a smoothing sub-module, where the screening sub-module is configured to screen out a temperature extremum in the original infrared temperature array according to an indoor environment temperature range where the region to be detected is located, where the temperature extremum includes an extremely high temperature value and/or an extremely low temperature value. The smoothing processing sub-module is used for carrying out data smoothing processing on the screened infrared temperature array so as to obtain a preprocessing temperature array. Further alternatively, the data smoothing process may include performing a gaussian filter or a median filter process, or the like.
Further, the image processing module 130 includes a gradient computing sub-module, a binarization processing sub-module and a morphology processing sub-module, wherein the gradient computing sub-module is used for performing gradient computation on an original temperature image formed by the preprocessing temperature array to obtain a gradient image, and the gradient image is used for reflecting the temperature difference between each pixel point and surrounding pixels; the binarization processing submodule is used for carrying out binarization processing on the gradient image based on a temperature difference threshold value of the water leakage area and the non-water leakage area to obtain a binarized image; and the morphological processing sub-module is used for carrying out morphological processing on the binarized image to obtain the temperature processing image. Further optionally, the morphological processing mainly includes performing an open operation of etching before expanding the binary image.
Further, the water leakage judging module 140 includes a contour extraction sub-module and an area detection sub-module, wherein the contour extraction sub-module is used for extracting all contours in the temperature processing image; the area detection sub-module is used for calculating the area of each contour, and determining an area formed by the contours as a target area when the area of one contour is larger than a preset area lower limit value and smaller than an area upper limit value until all contours are detected.
It will be appreciated that the apparatus of this embodiment corresponds to the indoor water leakage detection method of the above embodiment, and the options of the above embodiment are also applicable to this embodiment, so the description thereof will not be repeated here.
The present application also provides a readable storage medium storing a computer program which, when executed on a processor, implements the indoor water leakage detection method described above. Illustratively, the method includes: acquiring an original infrared temperature array of a region to be detected based on an infrared device; preprocessing the original infrared temperature array to obtain a preprocessed temperature array; performing image processing on an original temperature image formed by the preprocessing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area to obtain a temperature processing image; detecting whether a target area meeting a preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected.
It will be appreciated that the method options in the above embodiments are equally applicable to the present embodiment and will not be repeated here.
The readable storage medium may include, but is not limited to,: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application.

Claims (10)

1. An indoor water leakage detection method is characterized by comprising the following steps:
acquiring an original infrared temperature array of a region to be detected based on an infrared device;
preprocessing the original infrared temperature array to obtain a preprocessed temperature array;
performing image processing on an original temperature image formed by the preprocessing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area to obtain a temperature processing image;
detecting whether a target area meeting a preset contour condition exists in the temperature processing image, and taking the existing target area as a water leakage area in the area to be detected.
2. The indoor water leakage detection method according to claim 1, wherein the image processing of the original temperature image formed by the pre-processing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area comprises:
performing gradient calculation on an original temperature image formed by the preprocessing temperature array to obtain a gradient image, wherein the gradient image is used for reflecting the temperature difference between each pixel point and surrounding pixels;
performing binarization processing on the gradient image based on a temperature difference threshold value of the water leakage area and the non-water leakage area to obtain a binarized image;
and carrying out morphological processing on the binarized image to obtain the temperature processing image.
3. The indoor water leakage detection method according to claim 2, wherein the morphological processing of the binarized image comprises:
and performing an open operation of firstly corroding and then expanding on the binary image.
4. The indoor water leakage detection method according to claim 1, wherein the preprocessing the original infrared temperature array to obtain a preprocessed temperature array comprises:
according to the indoor environment temperature range of the area to be detected, temperature extreme values in the original infrared temperature array are screened out, and then data smoothing processing is carried out to obtain a preprocessing temperature array; wherein the temperature extremum comprises an extremely high temperature value and/or an extremely low temperature value.
5. The indoor water leakage detection method according to claim 4, wherein the data smoothing process includes a gaussian filter process or a median filter process.
6. The indoor water leakage detection method according to any one of claims 1 to 5, wherein the detecting whether or not there is a target area satisfying a preset profile condition in the temperature-treated image includes:
extracting all contours in the temperature processing image, and calculating the area of each contour;
and when the area of one contour is larger than the preset area lower limit value and smaller than the area upper limit value, determining an area formed by the contour as a target area until all contours are detected.
7. The indoor water leakage detection method according to claim 1, wherein the area to be detected is any one of an indoor floor area, an air conditioner outlet area, and an air conditioner pipe area.
8. An indoor water leakage detection device, comprising:
the temperature acquisition module is used for acquiring an original infrared temperature array of the region to be detected based on the infrared device;
the data preprocessing module is used for preprocessing the original infrared temperature array to obtain a preprocessed temperature array;
the image processing module is used for performing image processing on an original temperature image formed by the preprocessing temperature array based on the temperature difference characteristics of the water leakage area and the non-water leakage area so as to obtain a temperature processing image;
the water leakage judging module is used for detecting whether a target area meeting the preset contour condition exists in the temperature processing image or not, and taking the existing target area as a water leakage area in the area to be detected.
9. A terminal device, characterized in that it comprises an infrared means for acquiring raw infrared temperature data of an area to be detected, a processor storing a computer program, and a memory for executing the computer program to implement the indoor water leakage detection method according to any one of claims 1-7.
10. A readable storage medium, characterized in that it stores a computer program which, when executed on a processor, implements the indoor water leakage detection method according to any one of claims 1-7.
CN202310481056.2A 2023-04-27 2023-04-27 Indoor water leakage detection method, device, terminal equipment and readable storage medium Pending CN116558718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310481056.2A CN116558718A (en) 2023-04-27 2023-04-27 Indoor water leakage detection method, device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310481056.2A CN116558718A (en) 2023-04-27 2023-04-27 Indoor water leakage detection method, device, terminal equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116558718A true CN116558718A (en) 2023-08-08

Family

ID=87493949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310481056.2A Pending CN116558718A (en) 2023-04-27 2023-04-27 Indoor water leakage detection method, device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116558718A (en)

Similar Documents

Publication Publication Date Title
CN109002795B (en) Lane line detection method and device and electronic equipment
EP2118862B1 (en) System and method for video detection of smoke and flame
CN107749268B (en) Screen detection method and equipment
CN111612781A (en) Screen defect detection method and device and head-mounted display equipment
US20170154234A1 (en) Information processing device, information processing method, computer-readable recording medium, and inspection system
JP5019375B2 (en) Object detection apparatus and object detection method
CN110321933B (en) Fault identification method and device based on deep learning
JP4533836B2 (en) Fluctuating region detection apparatus and method
CN110197180B (en) Character defect detection method, device and equipment
CN111882568B (en) Fire image edge extraction processing method, terminal and system
US20210272272A1 (en) Inspection support apparatus, inspection support method, and inspection support program for concrete structure
CN114519714B (en) Method and system for judging smudgy defect of display screen
CN111598913B (en) Image segmentation method and system based on robot vision
CN115205223A (en) Visual detection method and device for transparent object, computer equipment and medium
CN115170804A (en) Surface defect detection method, device, system and medium based on deep learning
CN113785181A (en) OLED screen point defect judgment method and device, storage medium and electronic equipment
CN114821274A (en) Method and device for identifying state of split and combined indicator
US9628659B2 (en) Method and apparatus for inspecting an object employing machine vision
CN113065454B (en) High-altitude parabolic target identification and comparison method and device
KR101842535B1 (en) Method for the optical detection of symbols
CN116558718A (en) Indoor water leakage detection method, device, terminal equipment and readable storage medium
CN116363753A (en) Tumble detection method and device based on motion history image and electronic equipment
JP2007212238A (en) Water level detector and water level detection method using it
CN113763376B (en) Conveyor belt offset detection method, conveyor belt offset detection device, computer equipment and storage medium
CN110349133B (en) Object surface defect detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination