CN-115909385-B - Image processing method, device, storage medium and electronic equipment
Abstract
The application discloses an image processing method, an image processing device, a storage medium and electronic equipment. The method comprises the steps of obtaining a target image corresponding to a photovoltaic power station, wherein the target image is used for indicating complete design information of the photovoltaic power station, the target image comprises a plurality of power generation units, the power generation units at least comprise transformers, searching main path links corresponding to the power generation units according to positions of the transformers, determining target equipment information contained in envelopes of the power generation units, and moving the power generation units according to the target equipment information, the transformers and the main path links to obtain a split image of the target image. The application solves the technical problem that multiple complicated manual image dividing is needed when the image dividing is carried out due to the change of the design of the photovoltaic power station.
Inventors
- LEI BINHUA
- CHEN PENGPENG
Assignees
- 阳光新能源开发股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20221116
Claims (9)
- 1. A method of image processing, comprising: Obtaining a target image corresponding to a photovoltaic power station, wherein the target image is used for indicating complete design information of the photovoltaic power station, and comprises a plurality of power generation units, and the power generation units at least comprise transformers; The method comprises the steps of obtaining all transformers in a target image, sorting the transformers according to a preset rule, obtaining coordinates of a first transformer in the target image in the sorting result, adding the coordinates of the first transformer into a first-level link coordinate set, obtaining all line segments contacted in a preset range of first-level link coordinate values in the target image, judging each line segment, screening out a line with any endpoint equal to box inversion point coordinates of the first-level link from all line segments in the first-level link as a part of a main path link, obtaining all line segments contacted in a preset range of N-1-level link coordinate values in the target image, judging each line segment, selecting a line with any endpoint equal to endpoint coordinates of the N-1-level link from all line segments in the N-level link as a part of the main path link until no endpoint of the N-level link is not met, wherein the line with endpoint equal to box inversion point coordinates of the first-level link is equal to or more than 2, and determining that all the power generation units in the target image comprise the target image and the power generation units; the method comprises the steps of determining labels corresponding to all power generation units in a target image, sequencing all power generation units according to the labels to obtain sequencing results, determining target equipment information, the transformer and the main path link as target sets, and moving all sequenced power generation units according to the target sets.
- 2. The method of claim 1, wherein moving each of the sorted power generation units according to the target set comprises: Obtaining coordinate points corresponding to elements in the target set, wherein each element comprises the target equipment information, the transformer and the main path link; determining a minimum coordinate point and a maximum coordinate point in the coordinate points, and constructing rectangles corresponding to all the power generation units according to the minimum coordinate point and the maximum coordinate point; And moving each sequenced generating unit based on the rectangle.
- 3. The method of claim 2, wherein moving each of the sorted power generation units based on the rectangle comprises: Determining a first rectangle to be moved in the sequencing result as a target rectangle, selecting any vertex from the target rectangle as a moving reference point, and determining a first position of the moving reference point in the target image; And determining a second position of the image, wherein the second position is used for indicating a starting position in the image, and moving each power generation unit according to the first position and the second position.
- 4. A method according to claim 3, wherein moving the respective power generating units in accordance with the first and second positions comprises: determining a target movement vector value of the target rectangle based on the first position and the second position; And moving the power generation units based on the target movement vector value movement.
- 5. The method of claim 4, wherein moving the individual power generation units based on the target movement vector value movement comprises: Determining the target rectangular corresponding power generation unit as a target power generation unit, and moving each element in the target power generation unit based on the target movement vector value; determining a next power generation unit corresponding to the target power generation unit indicated in the sequencing result; The second position is taken as a reference point, the length of the target rectangle is prolonged in the X direction, and a new moving vector value is obtained at intervals of a preset distance; Moving all elements in the next power generation unit based on a new movement vector value; And sequentially determining movement vector values corresponding to all the remaining power generation units according to the sorting result, and moving all elements in all the remaining power generation units based on the movement vector values corresponding to all the remaining power generation units.
- 6. The method of any one of claims 1 to 5, wherein the target device information includes at least a string of photovoltaic groups of the power generation units.
- 7. An apparatus for image processing, comprising: The system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a target image corresponding to a photovoltaic power station, the target image is used for indicating complete design information of the photovoltaic power station, the target image comprises a plurality of power generation units, and the power generation units at least comprise transformers; The searching module is used for searching a main path link corresponding to each power generation unit according to the position of the transformer, and comprises the steps of acquiring all transformers in the target image, sequencing the transformers according to a preset rule, acquiring the coordinates of a first transformer in the target image in the sequencing result, adding the coordinates of the first transformer into a first-level link coordinate set, acquiring all line segments contacted in a preset range of a first-level link coordinate in the target image, judging each line segment, screening out all line segments in the first-level link, wherein a line with any endpoint equal to the box inversion point coordinates of the first-level link is a part of the main path link, acquiring all line segments contacted in a preset range of an N-1-level link coordinate in the target image, judging each line segment, and screening out all line segments in the N-level link until no endpoint equal to the endpoint coordinates of the N-1-level link is a part of the main path link, wherein N is no endpoint equal to or more than 2; The determining module is used for determining target equipment information included in the envelope line of each power generation unit, and moving each power generation unit according to the target equipment information, the transformer and the main path link to obtain a split image of the target image; The determining module is further configured to determine a label corresponding to each power generation unit in the target image, sort each power generation unit according to the label, obtain a sorting result, determine the target equipment information, the transformer and the main path link as a target set, and move each sorted power generation unit according to the target set.
- 8. A non-volatile storage medium, characterized in that the storage medium comprises a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the image processing method according to any one of claims 1 to 6.
- 9. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the instructions to implement the image processing method of any one of claims 1 to 6.
Description
Image processing method, device, storage medium and electronic equipment Technical Field The present application relates to the field of photovoltaic images, and in particular, to an image processing method, an image processing device, a storage medium, and an electronic apparatus. Background With the large-area use of photovoltaic power plants, the overall design and overall layout are important components of the photovoltaic power plant design, wherein one overall design is contained in the detailed design result of the photovoltaic power plant. The design general diagram of the photovoltaic power station comprises detailed information of the design of the whole power station, and comprises detailed information of partition information of a power generation unit, a photovoltaic group string, a combination mode of the power generation unit, a low-voltage cable laying path in a photovoltaic field area, a high-voltage cable laying path and the like. The location of all photovoltaic strings and devices is relatively accurate in geographic location. The design overview shows complete information and the overview information covers multiple types, but does not distinguish between the expertise in the design overview. If the special low-voltage cable laying technology only focuses on the low-voltage cable information of a single power generation unit, the relative position relation of the power generation units is not focused. In the related art, the main method of splitting the total graph is to manually select the information of the power generation unit according to the result of designing the total graph by a designer, but the manual selection process is complex. When the design of the photovoltaic power plant is changed, the design is generally changed in the overall design diagram, and if the diagram is required to be disassembled, manual diagram division is performed again. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides an image processing method, an image processing device, a storage medium and electronic equipment, which at least solve the technical problem that multiple complicated manual image dividing is required when dividing images due to the change of the design of a photovoltaic power station. According to one aspect of the embodiment of the application, an image processing method is provided, which comprises the steps of obtaining a target image corresponding to a photovoltaic power station, wherein the target image is used for indicating complete design information of the photovoltaic power station, the target image comprises a plurality of power generation units, the power generation units at least comprise transformers, searching main path links corresponding to the power generation units according to positions of the transformers, determining target equipment information contained in envelopes of the power generation units, and moving the power generation units according to the target equipment information, the transformers and the main path links to obtain a split image of the target image. The method comprises the steps of determining labels corresponding to all power generation units in a target image, sorting all power generation units according to the labels to obtain a sorting result, determining target equipment information, a transformer and a main path link as a target set, and moving all power generation units after sorting according to the target set. The method comprises the steps of obtaining coordinate points corresponding to elements in a target set, determining minimum coordinate points and maximum coordinate points in the coordinate points, constructing rectangles corresponding to the power generation units according to the minimum coordinate points and the maximum coordinate points, and moving the power generation units after sequencing based on the rectangles. The method comprises the steps of determining a first rectangle to be moved in a sequencing result as a target rectangle, selecting any vertex from the target rectangle as a moving reference point, determining a first position of the moving reference point in a target image, determining a second position of a map image, wherein the second position is used for indicating a starting position in the map image, and moving each power generation unit according to the first position and the second position. Optionally, moving each power generation unit according to the first position and the second position comprises determining a target movement vector value of the target rectangle based on the first position and the second position, and moving each power generation unit based on the target movement vector value movement. The method comprises the steps of determining a power generation unit corresponding to a target rectangle as a target power generation unit, moving each element in the target power generation unit based