CN110991050A - CAD (computer-aided design) image stacking method and related product - Google Patents
CAD (computer-aided design) image stacking method and related product Download PDFInfo
- Publication number
- CN110991050A CN110991050A CN201911239458.1A CN201911239458A CN110991050A CN 110991050 A CN110991050 A CN 110991050A CN 201911239458 A CN201911239458 A CN 201911239458A CN 110991050 A CN110991050 A CN 110991050A
- Authority
- CN
- China
- Prior art keywords
- cad
- image
- images
- coordinate
- file
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the application provides a CAD (computer-aided design) overlay method and a related product, wherein the method comprises the following steps: the method comprises the steps of obtaining a plurality of first CAD images in a first file, calculating coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image, establishing a mapping relation corresponding to every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations, and performing overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
Description
Technical Field
The application relates to the technical field of computers, in particular to a CAD (computer-aided design) image overlapping method and a related product.
Background
When a designer or a user designs a building, one Design cannot be formed at a time, and a good Design mostly undergoes multiple modifications and is gradually improved.
Disclosure of Invention
The embodiment of the application provides a CAD (computer-aided design) image stacking method and a related product, wherein a plurality of first CAD images are subjected to image stacking operation to obtain a target first CAD image, so that a user can conveniently check the target first CAD image, and the improvement of user experience is facilitated.
In a first aspect, an embodiment of the present application provides a CAD overlay method, where the method includes:
acquiring a plurality of first CAD images in a first file;
calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image;
according to the coordinate sets, establishing a corresponding mapping relation between every two first CAD images in the first CAD images to obtain a plurality of mapping relations;
and performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
In a second aspect, an embodiment of the present application provides a CAD drawing device, including: an acquisition unit, a calculation unit, a setup unit and an operation unit, wherein,
the acquisition unit is used for acquiring a plurality of first CAD images in a first file;
the calculating unit is used for calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, and each coordinate set corresponds to one first CAD image;
the establishing unit is used for establishing a corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations;
and the operation unit is used for carrying out image overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory; and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for some or all of the steps as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, where the computer program is used to make a computer execute some or all of the steps described in the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that, with the CAD drawing stacking method and the related product described in the embodiments of the present application, the method may include: the method comprises the steps of obtaining a plurality of first CAD images in a first file, calculating coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image, establishing a mapping relation corresponding to every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations, and performing overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flowchart of an embodiment of a CAD overlay method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flowchart of an embodiment of a CAD overlay method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flowchart of an embodiment of a CAD overlay method according to an embodiment of the present disclosure; (ii) a
FIG. 4 is a schematic structural diagram of an embodiment of a CAD overlay apparatus provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device related to the embodiments of the present application may include various handheld devices, vehicle-mounted devices, wearable devices (smart watches, smart bracelets, wireless headsets, augmented reality/virtual reality devices, smart glasses), computing devices or other processing devices connected to wireless modems, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like, which have wireless communication functions. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices, and in addition, the electronic devices in the embodiments of the present application may also be servers.
Referring to fig. 1, a schematic flow chart diagram of an embodiment of a CAD drawing stacking method according to an embodiment of the present application is shown, where the CAD drawing stacking method described in this embodiment includes the following steps:
101. a plurality of first CAD images in a first file are acquired.
The first file may be a folder or a document file, the format of the document file may be dwg file format, dwt file format or dxf file format, but is not limited thereto, the first file may include a plurality of first CAD images, and the first CAD images may include at least one of the following: the plurality of first CAD images may be CAD images corresponding to different versions or formats, the plurality of first CAD images may be randomly arranged in the first file, and if the first file is a folder, the plurality of CAD images may be presented in the first file in a file format such as a dwg file format, a dwt file format, or a dxf file format.
Optionally, after the step 101, the following steps may be further included:
a1, acquiring a plurality of second CAD images in a second file;
a2, matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees;
a3, selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the multiple matching degrees;
a4, marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file;
a5, performing image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
The first file and the second file are two different files, and may be files corresponding to different users (designers), or design drawings of different versions corresponding to the same designer, where the preset threshold may be set by the user or default to the system, and is not limited herein, and the preset manner may be set by the user or default to the system, for example, the preset manner may be a color mark, and different colors may be used to color mark the target first file and the target second file, respectively, so as to distinguish the target first file from the target second file.
In addition, because when designing drawings, a plurality of designers may design the same building, but design different parts respectively, at this time, if a plurality of CAD images in a document are directly superimposed, which may cause the situation of overlapping or unclear parts, the images may be marked in a preset manner, and when primitives in CAD images corresponding to two different versions or different designers are overlapped, different parts may be distinguished.
Further, in a specific implementation, the plurality of first CAD images and the plurality of second CAD images may be matched to obtain a plurality of matching degrees, at least one first CAD image and at least one second CAD image corresponding to at least one matching degree smaller than or equal to a preset threshold among the plurality of matching degrees are selected to screen out different CAD images of the two files, the first CAD image and the second CAD image are marked according to a preset manner to distinguish the CAD images of the two images to obtain at least one target first file and at least one target second file, and finally the target first file and the target second file are subjected to a layout overlapping operation to obtain a file including at least one first target file, that is, the at least one first CAD image and the at least one second CAD image are subjected to a layout overlapping operation to obtain at least one target CAD image, the target CAD image comprises the at least one first CAD image and the at least one second CAD image, and the specific drawing folding operation is consistent with the embodiment of the application and is not repeated herein, so that the splicing of the parts designed by a plurality of designers is realized to obtain a complete design drawing, and the work efficiency is improved.
102. And calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image.
In a specific implementation, the plurality of first CAD images may be placed in different coordinate systems, and each first CAD image may correspond to one coordinate system, so that a coordinate corresponding to each first CAD image may be obtained, where the coordinate may be a coordinate corresponding to each image element in the CAD image or a coordinate corresponding to each pixel point in the image, so that a plurality of coordinate sets may be obtained, and each coordinate set corresponds to one first CAD image.
In one possible example, the step 102 of calculating coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets may include the steps of:
21. determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
22. and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
In a specific implementation, a corresponding pixel range in the first CAD image i can be determined, a pixel line number corresponding to the first CAD image i is determined through the pixel range, and then, a coordinate corresponding to each pixel in the first CAD image i is obtained through traversing a pixel coordinate of each line of pixels corresponding to the pixel line number to obtain the coordinate set i.
103. And establishing a corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations.
In the embodiment of the present application, a plurality of corresponding first CAD images in a first file need to be subjected to a mapping operation, before the mapping operation is performed, a mapping relationship between every two first CAD images needs to be obtained, and the mapping relationship between every two first CAD images in the plurality of first CAD images can be obtained according to the plurality of coordinate sets.
In a possible example, in the step 103, establishing a corresponding mapping relationship between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relationships, the method may include the following steps:
31. according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel in the first CAD image i, wherein the coordinate set j is mapped to a coordinate j in a first CAD image j, and the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
32. respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
33. and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
The mapping relationship between every two first CAD images can be obtained according to the coordinate set between every two first CAD images in the plurality of first CAD images, and the coordinate sets corresponding to the plurality of first CAD images can correspond to different coordinate systems, so that the mapping relationship between every two first CAD images can be obtained based on the mapping mode of the coordinates in the coordinate sets.
In a specific implementation, a coordinate set i corresponding to any one first CAD image i in the plurality of first CAD images may be mapped to a coordinate system corresponding to another first CAD image j, a coordinate j of the first CAD image i in the first CAD image j may be obtained, and a coordinate set j including a plurality of coordinates j may be obtained, and then, a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j may be respectively established according to the coordinate set i and the coordinate set j, the first matrix representing a coordinate relationship corresponding to all pixel points in the coordinate set i, the second matrix representing the coordinate set j, that is, a mapping coordinate set j of the coordinate set i in the first CAD image j different from the first CAD image i, may be determined based on the first matrix and the second matrix, and finally, based on the above manner, and obtaining the mapping relation between every two first CAD images in the plurality of first CAD images, thereby obtaining a plurality of mapping relations.
104. And performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
In this embodiment of the present application, because the plurality of first CAD images may be a plurality of first CAD images corresponding to different modification versions or design versions, based on the plurality of mapping relationships, the plurality of first CAD images may be subjected to a drawing stacking operation to obtain a target first CAD image, and the target first CAD image may include the plurality of first CAD images, which is beneficial to helping a user to search and compare CAD images.
In a possible example, the step 104, performing a mapping operation on the plurality of first CAD images based on the plurality of mapping relationships, may include the following steps:
41. sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
42. and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
Wherein, during the drawing folding operation, in order to avoid the drawing folding operation, the plurality of first CAD images may be sorted, the sorting mode may be set by a user or default by a system, for example, the memory size of the file corresponding to each CAD image may be sorted from large to small to obtain a plurality of serial numbers, and the coordinate set corresponding to the first CAD image with the smaller serial number in each any two CAD images in the plurality of CAD images is mapped to the first CAD image with the larger serial number according to the precedence relationship of the plurality of serial numbers and the mapping relationship corresponding to the two first CAD images corresponding to each two serial numbers, so that the steps are continuously repeated to finally obtain a target first CAD image, which may include the plurality of first CAD images, thereby facilitating the user or designer to change or compare the plurality of first CAD images, the method is beneficial to improving the user experience.
Optionally, when the target first CAD image is obtained, the serial number corresponding to each first CAD image is also displayed in the target first CAD image, so as to distinguish CAD images corresponding to different versions.
Optionally, before the step 104, before the overlaying operation is performed on the plurality of first CAD images based on the plurality of mapping relationships, the following steps may be further included:
b1, identifying the direction of each CAD image in the plurality of first CAD images;
b2, selecting a direction corresponding to any one of the first CAD images as a target direction;
b3, adjusting the plurality of first CAD images based on the target direction.
The first CAD images stored in the first file are adjusted according to different directions, and then the adjusted first CAD images are subjected to image overlapping operation to obtain target first CAD images corresponding to the same direction, so that the viewing experience of a user is improved.
In a specific implementation, a direction corresponding to any one of the plurality of first CAD images may be selected as a target direction, and the plurality of directions corresponding to the plurality of first CAD images are adjusted to the target direction, so as to obtain a plurality of adjusted first CAD images.
The CAD image stacking method provided by the embodiment of the application can obtain a plurality of first CAD images in a first file, calculate the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, establish the corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations, and perform the stacking operation on the plurality of first CAD images based on the plurality of mapping relations to obtain the target first CAD image.
In accordance with the above, please refer to fig. 2, which is a flowchart illustrating an embodiment of a CAD drawing stacking method according to an embodiment of the present application. The CAD drawing stacking method described in this embodiment includes the following steps:
201. a plurality of first CAD images in a first file are acquired.
202. And calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image.
203. And calculating a coordinate j of each pixel in the first CAD image i mapped to a coordinate j in a first CAD image j according to a coordinate set i corresponding to the first CAD image i to obtain a coordinate set j, wherein the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i.
204. And respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j.
205. And determining the mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix to obtain a plurality of mapping relations.
206. And performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
Optionally, the detailed description of the steps 201 to 206 may refer to the corresponding steps from step 101 to step 104 of the CAD drawing method described in fig. 1, and will not be described herein again.
It can be seen that, by the CAD stack method provided by the embodiment of the present application, a plurality of first CAD images in a first file may be obtained, coordinates of each image in the plurality of first CAD images are calculated to obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, according to a coordinate set i corresponding to the first CAD image i, each pixel coordinate in the first CAD image i is calculated to be mapped to a coordinate j in the first CAD image j to obtain a coordinate set j, where the coordinate set j includes a plurality of coordinates j, the first CAD image j is different from the first CAD image i, based on the coordinate set i and the coordinate set j, a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j are respectively calculated, based on the first matrix and the second matrix, a mapping relationship between the first CAD image i and the first CAD image j is determined, a plurality of mapping relationships are obtained, based on the plurality of mapping relationships, the method comprises the steps of carrying out image overlapping operation on a plurality of first CAD images to obtain a target first CAD image, positioning each first CAD image to obtain a coordinate set corresponding to each first CAD image, obtaining a mapping relation between every two first CAD images to obtain a plurality of mapping relations between the plurality of first CAD images, and finally carrying out image overlapping operation on the plurality of first CAD images according to the plurality of mapping relations, so that the efficiency of the image overlapping operation is improved.
In accordance with the above, please refer to fig. 3, which is a flowchart illustrating an embodiment of a CAD drawing stacking method according to an embodiment of the present application. The CAD drawing stacking method described in this embodiment includes the following steps:
301. a plurality of first CAD images in a first file are acquired.
302. A plurality of second CAD images in the second file are acquired.
303. And matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees.
304. And selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees.
305. And marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file.
306. And carrying out image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
Optionally, the detailed description of the steps 301 to 306 may refer to the corresponding steps from step 101 to step 104 of the CAD drawing method described in fig. 1, and will not be described herein again.
It can be seen that, by the CAD stack method provided by the embodiment of the present application, a plurality of first CAD images in a first file may be obtained, a plurality of second CAD images in a second file may be obtained, the plurality of second CAD images are matched with the plurality of first CAD images one by one to obtain a plurality of matching degrees, at least one first CAD image and at least one second CAD image corresponding to at least one matching degree smaller than or equal to a preset threshold value in the plurality of matching degrees are selected, the at least one first CAD image and the at least one second CAD image are marked according to a preset manner to obtain a marked target first file and a marked target second file, the target first file and the target second file are stacked to obtain a target file, the target file includes the marked at least one first CAD image and the marked second CAD image, and thus the plurality of first CAD images may be compared with the plurality of second CAD images, and obtaining different target first files and target second files, and then performing image overlapping operation on at least one target first file and at least one target second file respectively corresponding to the first files and the second files so as to realize image overlapping operation of CAD images corresponding to different files, thereby being beneficial to improving the practicability of the image overlapping operation.
In accordance with the above, the following is a device for implementing the CAD overlay method, specifically as follows:
please refer to fig. 4, which is a schematic structural diagram of an embodiment of a CAD drawing stacking apparatus according to an embodiment of the present disclosure. The CAD drawing folding device described in this embodiment includes: the acquisition unit 401, the calculation unit 402, the establishment unit 403, and the operation unit 404 are, specifically as follows,
the acquiring unit 401 is configured to acquire a plurality of first CAD images in a first file;
the calculating unit 402 is configured to calculate coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets, where each coordinate set corresponds to one first CAD image;
the establishing unit 403 is configured to establish, according to the multiple coordinate sets, a corresponding mapping relationship between every two first CAD images in the multiple first CAD images to obtain multiple mapping relationships;
the operation unit 404 is configured to perform a drawing-stacking operation on the plurality of first CAD images based on the plurality of mapping relationships to obtain a target first CAD image.
The obtaining unit 401 may be configured to implement the method described in step 101, the calculating unit 402 may be configured to implement the method described in step 102, the establishing unit 403 may be configured to implement the method described in step 103, the operating unit 404 may be configured to implement the method described in step 104, and so on.
It can be seen that, with the CAD stack apparatus described in the embodiment of the present application, the apparatus may obtain a plurality of first CAD images in a first file, calculate coordinates of each image in the plurality of first CAD images, obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, establish a mapping relationship corresponding to each two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets, obtain a plurality of mapping relationships, and perform a stack operation on the plurality of first CAD images based on the plurality of mapping relationships, to obtain a target first CAD image.
In one possible example, in the calculating the coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets, the calculating unit 402 is specifically configured to:
determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
In a possible example, in the aspect that the mapping relationship corresponding to every two first CAD images in the plurality of first CAD images is established according to the plurality of coordinate sets, so as to obtain a plurality of mapping relationships, the establishing unit 403 is specifically configured to:
according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel in the first CAD image i, wherein the coordinate set j is mapped to a coordinate j in a first CAD image j, and the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
In one possible example, in terms of performing the overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the operation unit 404 may be specifically configured to:
sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
It can be understood that the functions of each program module of the CAD drawing folding device in this embodiment can be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process thereof may refer to the related description of the foregoing method embodiment, which is not described herein again.
In accordance with the above, please refer to fig. 5, which is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present disclosure. The electronic device described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, e.g., a CPU; and a memory 4000, the input device 1000, the output device 2000, the processor 3000, and the memory 4000 being connected by a bus 5000.
The input device 1000 may be a touch panel, a physical button, or a mouse.
The output device 2000 may be a display screen.
The memory 4000 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 4000 is used for storing a set of program codes, and the input device 1000, the output device 2000 and the processor 3000 are used for calling the program codes stored in the memory 4000 to execute the following operations:
the processor 3000 is configured to:
acquiring a plurality of first CAD images in a first file;
calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image;
according to the coordinate sets, establishing a corresponding mapping relation between every two first CAD images in the first CAD images to obtain a plurality of mapping relations;
and performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
It can be seen that, with the electronic device described in the embodiment of the present application, a plurality of first CAD images in a first file may be obtained, coordinates of each image in the plurality of first CAD images are calculated to obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, a mapping relationship corresponding to each two first CAD images in the plurality of first CAD images is established according to the plurality of coordinate sets to obtain a plurality of mapping relationships, and a superimposition operation is performed on the plurality of first CAD images based on the plurality of mapping relationships to obtain a target first CAD image.
In one possible example, in the calculating the coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets, the processor 3000 is specifically configured to:
determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
In one possible example, in the aspect that the mapping relationship corresponding to every two first CAD images in the plurality of first CAD images is established according to the plurality of coordinate sets, so as to obtain a plurality of mapping relationships, the processor 3000 is specifically configured to:
according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel in the first CAD image i, wherein the coordinate set j is mapped to a coordinate j in a first CAD image j, and the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
In one possible example, in the aspect of performing the overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the processor 3000 is specifically configured to:
sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
In one possible example, the processor 3000 is further configured to:
acquiring a plurality of second CAD images in a second file;
matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees;
selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees;
marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file;
and carrying out image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
In one possible example, before performing the overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the processor 3000 is further specifically configured to:
identifying an orientation of each of the plurality of first CAD images;
selecting a direction corresponding to any one of the plurality of first CAD images as a target direction;
adjusting the plurality of first CAD images based on the target direction.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of any one of the CAD drawing methods described in the above method embodiments.
While the present application has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus (device), or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable CAD drawing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable CAD drawing device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable CAD drawing device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable CAD drawing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A CAD overlay method, comprising:
acquiring a plurality of first CAD images in a first file;
calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image;
according to the coordinate sets, establishing a corresponding mapping relation between every two first CAD images in the first CAD images to obtain a plurality of mapping relations;
and performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
2. The method of claim 1, wherein the calculating coordinates for each of the plurality of first CAD images to obtain a plurality of sets of coordinates comprises:
determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
3. The method according to claim 2, wherein the establishing a mapping relationship corresponding to each two of the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relationships comprises:
according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel in the first CAD image i, wherein the coordinate set j is mapped to a coordinate j in a first CAD image j, and the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
4. The method of claim 1, wherein said performing a mapping operation on the plurality of first CAD images based on the plurality of mapping relationships comprises:
sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
5. The method of claim 1, further comprising:
acquiring a plurality of second CAD images in a second file;
matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees;
selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees;
marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file;
and carrying out image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
6. The method of any of claims 1-4, wherein prior to said performing an overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the method further comprises:
identifying an orientation of each of the plurality of first CAD images;
selecting a direction corresponding to any one of the plurality of first CAD images as a target direction;
adjusting the plurality of first CAD images based on the target direction.
7. A CAD overlay apparatus, comprising: an acquisition unit, a calculation unit, a setup unit and an operation unit, wherein,
the acquisition unit is used for acquiring a plurality of first CAD images in a first file;
the calculating unit is used for calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, and each coordinate set corresponds to one first CAD image;
the establishing unit is used for establishing a corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations;
and the operation unit is used for carrying out image overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
8. The apparatus according to claim 7, wherein, in said calculating coordinates of each of the plurality of first CAD images to obtain a plurality of sets of coordinates, the calculating unit is specifically configured to:
determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
9. An electronic device comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-6.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911239458.1A CN110991050B (en) | 2019-12-06 | 2019-12-06 | CAD (computer-aided design) image stacking method and related product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911239458.1A CN110991050B (en) | 2019-12-06 | 2019-12-06 | CAD (computer-aided design) image stacking method and related product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110991050A true CN110991050A (en) | 2020-04-10 |
CN110991050B CN110991050B (en) | 2022-10-14 |
Family
ID=70090579
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911239458.1A Active CN110991050B (en) | 2019-12-06 | 2019-12-06 | CAD (computer-aided design) image stacking method and related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110991050B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111858987A (en) * | 2020-07-08 | 2020-10-30 | 万翼科技有限公司 | Problem checking method of CAD (computer-aided design) image, electronic equipment and related product |
CN114549376A (en) * | 2022-01-10 | 2022-05-27 | 万翼科技有限公司 | Method, device, equipment and storage medium for calculating superposition of book graph and plan graph |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101542536A (en) * | 2006-11-20 | 2009-09-23 | 汤姆森特许公司 | System and method for compositing 3D images |
US20100092070A1 (en) * | 2008-10-12 | 2010-04-15 | Fei Company | High accuracy beam placement for local area navigation |
CN104135935A (en) * | 2012-02-13 | 2014-11-05 | 霍罗吉克公司 | System and method for navigating a tomosynthesis stack using synthesized image data |
CN104361556A (en) * | 2014-10-22 | 2015-02-18 | 华为技术有限公司 | Image synthesis method, image chip and image equipment |
US20170186202A1 (en) * | 2015-12-25 | 2017-06-29 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium |
JP2018010455A (en) * | 2016-07-13 | 2018-01-18 | 東芝プラントシステム株式会社 | Three-dimensional cad data creation system and creation method |
US20190149808A1 (en) * | 2017-11-10 | 2019-05-16 | Misapplied Sciences, Inc. | Precision multi-view display |
-
2019
- 2019-12-06 CN CN201911239458.1A patent/CN110991050B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101542536A (en) * | 2006-11-20 | 2009-09-23 | 汤姆森特许公司 | System and method for compositing 3D images |
US20100092070A1 (en) * | 2008-10-12 | 2010-04-15 | Fei Company | High accuracy beam placement for local area navigation |
CN104135935A (en) * | 2012-02-13 | 2014-11-05 | 霍罗吉克公司 | System and method for navigating a tomosynthesis stack using synthesized image data |
CN104361556A (en) * | 2014-10-22 | 2015-02-18 | 华为技术有限公司 | Image synthesis method, image chip and image equipment |
US20170186202A1 (en) * | 2015-12-25 | 2017-06-29 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and non-transitory computer-readable storage medium |
JP2018010455A (en) * | 2016-07-13 | 2018-01-18 | 東芝プラントシステム株式会社 | Three-dimensional cad data creation system and creation method |
US20190149808A1 (en) * | 2017-11-10 | 2019-05-16 | Misapplied Sciences, Inc. | Precision multi-view display |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111858987A (en) * | 2020-07-08 | 2020-10-30 | 万翼科技有限公司 | Problem checking method of CAD (computer-aided design) image, electronic equipment and related product |
CN111858987B (en) * | 2020-07-08 | 2023-10-20 | 深圳市万翼数字技术有限公司 | Problem viewing method of CAD image, electronic equipment and related products |
CN114549376A (en) * | 2022-01-10 | 2022-05-27 | 万翼科技有限公司 | Method, device, equipment and storage medium for calculating superposition of book graph and plan graph |
Also Published As
Publication number | Publication date |
---|---|
CN110991050B (en) | 2022-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9401032B1 (en) | Image-based color palette generation | |
US9177391B1 (en) | Image-based color palette generation | |
US9311889B1 (en) | Image-based color palette generation | |
US20160104303A1 (en) | Image-based color palette generation | |
CN108961183B (en) | Image processing method, terminal device and computer-readable storage medium | |
CN109348731A (en) | A kind of method and device of images match | |
CN111950056B (en) | BIM display method and related equipment for building informatization model | |
CN112288665A (en) | Image fusion method and device, storage medium and electronic equipment | |
CN110991050B (en) | CAD (computer-aided design) image stacking method and related product | |
CN111290684B (en) | Image display method, image display device and terminal equipment | |
CN111625160A (en) | Application icon adjusting method and device | |
EP3410389A1 (en) | Image processing method and device | |
CN111782758A (en) | Drawing review result viewing method based on CAD and related device | |
CN105654103B (en) | Image identification method and electronic equipment | |
CN103955713B (en) | A kind of icon-based programming method and apparatus | |
CN110619597A (en) | Semitransparent watermark removing method and device, electronic equipment and storage medium | |
CN109359582A (en) | Information search method, information search device and mobile terminal | |
CN106909272B (en) | Display control method and mobile terminal | |
CN111143912B (en) | Display labeling method and related product | |
CN106547891A (en) | For the quick visualization method of the pictured text message of palm display device | |
CN111107264A (en) | Image processing method, image processing device, storage medium and terminal | |
CN107633498B (en) | Image dark state enhancement method and device and electronic equipment | |
CN115794245A (en) | Data loading method and device, electronic equipment and storage medium | |
JP2013120201A (en) | Information processing apparatus and method | |
CN112419444B (en) | Clothing sheet drawing method and device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230626 Address after: A601, Zhongke Naneng Building, No. 06 Yuexing 6th Road, Gaoxin District Community, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province, 518063 Patentee after: Shenzhen Wanyi Digital Technology Co.,Ltd. Address before: 519000 room 105-24914, No.6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province (centralized office area) Patentee before: WANYI TECHNOLOGY Co.,Ltd. |
|
TR01 | Transfer of patent right |