CN111161351B - Target component coordinate acquisition method and system - Google Patents
Target component coordinate acquisition method and system Download PDFInfo
- Publication number
- CN111161351B CN111161351B CN201911316105.7A CN201911316105A CN111161351B CN 111161351 B CN111161351 B CN 111161351B CN 201911316105 A CN201911316105 A CN 201911316105A CN 111161351 B CN111161351 B CN 111161351B
- Authority
- CN
- China
- Prior art keywords
- target
- coordinate
- target object
- objects
- areas
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- User Interface Of Digital Computer (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Image Generation (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a target component coordinate acquisition method, which is used for acquiring a coordinate range of a target component in a two-dimensional graph; wherein the two-dimensional graphic comprises at least one object; the method comprises the following steps: step S1, obtaining characteristics of a target component; step S2, screening out objects with target component characteristics from all objects according to the target component characteristics to serve as target objects; step S3, calculating the coordinate area of the target object based on a preset mode, and taking the coordinate area obtained by calculation as the coordinate area of a target object group comprising a plurality of target objects; and S4, combining the coordinate areas of all the target object groups to obtain the coordinate ranges of all the target components. The invention also discloses a target component coordinate acquisition system which is used for rapidly acquiring the coordinate range of the component in the two-dimensional graph, and the component retrieval efficiency is improved.
Description
Technical Field
The invention relates to the technical field of computer application, in particular to a target component coordinate acquisition method and a target component coordinate acquisition system.
Background
The existing two-dimensional graphics are mainly drawn through Auto CAD, coreldraw, adobe illustrator and other software, a user can finish the design and drawing of the two-dimensional graphics on a terminal provided with the software, and along with the development of science and technology, the drawing technology is also applied to various industries.
However, with the development of technology, the requirements of most industries on drawing are higher and higher, the area of a graph drawn in the existing drawing software is larger and larger, and more graph elements are contained in a pair of two-dimensional graphs; when a user needs to search for a specific component or graphic element in a plurality of graphic elements, the operation becomes extremely difficult, and even all the graphics of the whole drawing need to be referred for one time, so that the method greatly increases the workload and reduces the working efficiency; how to find the wanted component pattern in the two-dimensional pattern quickly, and obtaining the range of the component becomes a big problem.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provides a target component coordinate acquisition method and a target component coordinate acquisition system, which are used for quickly finding out a desired component graph in a two-dimensional graph and acquiring the range of a component.
In order to solve the technical problems, the present invention provides a method for acquiring coordinates of a target member, which is used for acquiring a coordinate range of the target member in a two-dimensional graph; the two-dimensional graphic includes at least one object; the method comprises the following steps:
step S1, obtaining characteristics of a target component;
Step S2, screening out objects with target component characteristics from all objects according to the target component characteristics to serve as target objects;
step S3, calculating the coordinate area of the target object based on a preset mode, and taking the coordinate area obtained by calculation as the coordinate area of a target object group comprising a plurality of target objects;
and S4, combining the coordinate areas of all the target object groups to obtain the coordinate ranges of all the target components.
The invention also provides a target component coordinate acquisition system, wherein the two-dimensional graph comprises at least one object; the target member coordinate acquisition system includes:
the feature acquisition module is used for acquiring the features of the target component;
the target screening module is used for screening out objects with target component characteristics from all objects according to the target component characteristics to serve as target objects;
the coordinate region operation module is used for operating the coordinate region of the target object based on a preset mode, and taking the coordinate region obtained by operation as the coordinate region of a target object group comprising a plurality of target objects;
and the range combination module is used for combining the coordinate areas of all the target object groups to obtain the coordinate ranges of all the target components.
According to the target component coordinate acquisition method and the target component coordinate acquisition system, the target component characteristics input by a user are acquired, the target objects are screened out from all objects of the two-dimensional graph according to the target component characteristics, then the coordinate areas of the target objects are calculated and grouped to obtain target object groups, and all the target object groups are combined to obtain the coordinate ranges of all the target components, so that the coordinate ranges of the target components are quickly acquired in the two-dimensional graph, and the searching precision of the coordinate ranges of the target components is improved; the screening range is enlarged, the coordinate range of the obtained target component is more comprehensive, the drawing efficiency is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for acquiring coordinates of a target member in an embodiment of the invention.
Fig. 2 is a sub-flowchart of step S1 in fig. 1.
Fig. 3 is a first partial sub-flowchart of step S2 in fig. 1.
Fig. 4 is a sub-flowchart of step S3 in fig. 1.
Fig. 5 is a block diagram of a target member coordinate acquisition system in an embodiment of the invention.
Fig. 6 is a block diagram of the feature acquisition module of fig. 5.
Fig. 7 is a block diagram of the structure of the object screening module of fig. 5.
Fig. 8 is a block diagram of the coordinate area operation module in fig. 5.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without any inventive effort, are intended to be within the scope of the invention.
In describing embodiments of the present invention, it should be understood that the terms "first" and "second" are merely for convenience of description and simplicity of description, and thus should not be construed as limiting the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for acquiring coordinates of a target member according to an embodiment of the invention.
As shown in fig. 1, the present invention provides a target member coordinate acquiring method for acquiring a coordinate range of a target member in a two-dimensional graph; wherein the two-dimensional graphic comprises at least one object; the method comprises the following steps: step S1, obtaining characteristics of a target component; step S2, screening out objects with target component characteristics from all objects according to the target component characteristics to serve as target objects; step S3, calculating the coordinate area of the target object based on a preset mode, and taking the coordinate area obtained by calculation as the coordinate area of a target object group comprising a plurality of target objects; and S4, combining the coordinate areas of all the target object groups to obtain the coordinate ranges of all the target components.
According to the target component coordinate acquisition method provided by the invention, the target component characteristics input by a user are acquired, the target objects are screened out from all objects of the two-dimensional graph according to the target component characteristics, then the coordinate areas of the target objects are calculated and grouped to obtain the target object groups, and all the target object groups are combined to obtain the coordinate ranges of all the target components, so that the coordinate ranges of the target components are quickly acquired in the two-dimensional graph, and the searching precision of the coordinate ranges of the target components is improved; the screening range is enlarged, the coordinate range of the obtained target component is more comprehensive, the drawing efficiency is improved, and the user experience is improved.
Referring to fig. 2, fig. 2 is a sub-flowchart of step S1 in fig. 1.
As shown in fig. 2, in some embodiments, the step S1 includes: step S11, acquiring all objects in the two-dimensional graph, and requesting a user to select an object capable of representing a target member from all objects; and step S12, taking the object which can represent the target component and is selected by the user as the target component characteristic.
Wherein the two-dimensional graph refers to a planar graph drawn in one plane and containing no depth information. The two-dimensional graph in the embodiment refers to an electronic plane graph drawn by a user through a drawing tool at a drawing interface, and the two-dimensional graph includes at least one graph element.
The object refers to a minimum unit in the two-dimensional graph, namely a basic graph element for forming the two-dimensional graph, and the object comprises individual points, lines and the like; points, lines in the two-dimensional graphics composition block also belong to the object. The objects may have the conditions of intersection, coincidence and the like, but each object can independently execute user instructions, that is, a user can independently select, delete, transform and the like each object. The two-dimensional graph includes at least one object therein.
The target component is in this embodiment a pattern of components that the user wants to find in an existing two-dimensional pattern. The component is a part or component of known construction. Such as doors, windows, parking spaces, risers, etc. The target member includes at least one object. The number and the positions of the target components are not fixed, and more than one target component or no target component can exist in the two-dimensional graph; the positions of the target members may be located at different positions in the two-dimensional pattern, or may be displayed in a superimposed manner at the same position in the two-dimensional pattern.
The target member feature refers to an object capable of distinguishing a graphic of a target member from a graphic of other members in a two-dimensional graphic among all objects of the target member. The target component feature can be one object on a component or a plurality of objects on the component; the target component features can be distinguishing objects selected on the graph of the target component after the graphic software developer compares the graphs according to the graphs of all components in advance, and the distinguishing objects are used as the target component features after being determined by a user; the user may also characterize the selected object as the target member in the two-dimensional graph.
The target object refers to an object corresponding to the target feature in the two-dimensional graph. The target object is the same as all objects in the target component characteristics selected by the user; the target object is the corresponding same object found in the two-dimensional graph according to the target component characteristics selected by the user.
The coordinate region refers to a range of all coordinate compositions of the target object in the coordinate system; the coordinate area may be the coordinates of the midpoint of the target object, or may be an area formed by all coordinates between two endpoints of a line segment, or may be an area surrounded by a certain closed graph on the two-dimensional graph, for example, a closed area surrounded by a curve such as a circle.
The method and the device are mainly applied to the mobile terminal, and a user can draw the two-dimensional graph through a drawing tool on the mobile terminal. The mobile terminal comprises a mobile phone, a computer and the like, and the drawing tool comprises drawing software. The invention can also be applied to the drawing software. Besides, the method and the device can be applied to some servers for online drawing of the two-dimensional graph, and assist a user to quickly find and replace the target graph or the component in the drawn two-dimensional graph.
The terminals include a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the central processing unit is a data processing center of the terminal, and connects the various components of the terminal using wired or wireless lines.
Specifically, after a user inputs a target component coordinate acquisition instruction on a two-dimensional drawing interface, the terminal displays all objects in a two-dimensional graph of a current layer and displays a request window; the request window includes at least one component type, which may be a component graphic or a component name, for example: doors, windows, risers, etc.; the request window is further used for guiding a user to select the type of the target component from the types of the components; after the terminal obtains the type of the target component input by the user, highlighting a preset object capable of representing the target component in a request window according to the type of the target component input by the user; and the terminal takes the object which is highlighted in the request window and can represent the target component as the target component characteristic after receiving the confirmation instruction input by the user.
In other embodiments, the request window is used for requesting the user to directly click and select an object capable of representing the target component in the two-dimensional graph, highlighting the object selected by the user in the two-dimensional graph, or copying the object selected by the user into the request window to perform preview display while the user clicks and selects, and the terminal takes the object selected by the user as the characteristic of the target component after receiving the confirmation instruction input by the user through the request window.
Therefore, the object selected by the user in the two-dimensional graph is obtained and used as the characteristic capable of representing the target component, the object selected by the user is used as the searching basis of the target component, a larger selection space is provided for the user, the searching operability is realized, and the characteristic searching possibility of the target component is increased.
Referring to fig. 3, fig. 3 is a sub-flowchart of step S2 in fig. 1.
As shown in fig. 3, in some embodiments, the step S2 includes: s21, acquiring all objects in the two-dimensional graph; step S22, searching objects corresponding to the characteristics of the target component from all objects of the two-dimensional graph as target objects; step S23, deleting the non-target object and retaining the display target object.
Wherein, the non-target object refers to the object in the two-dimensional graph, which does not correspond to the target object feature, that is, all objects except the target object.
Specifically, after the terminal obtains the target component characteristics input by the user, all objects in the two-dimensional graph are obtained.
And the terminal searches all objects of the two-dimensional graph according to the target object characteristics to obtain the object which corresponds to the target component characteristics and is the same as the target object.
And the terminal takes the objects except all the target objects in the two-dimensional graph as non-target objects according to the searched target objects. And deleting all non-target objects, and keeping and displaying the target objects.
In other embodiments, the terminal highlights the target object after finding the target object. For example, thickening, reddening, etc. the target object; or to ignore the non-target object, such as gray scale, light color display, etc.
In other embodiments, the user inputs a search range through the terminal, and the terminal searches the target object in the search range input by the user according to the target member characteristics; for example, the user selects a certain area as a searching area, the terminal searches the target object only in the searching area, deletes the non-target object in the searching area, and keeps displaying the target object in the facing-the-poster area. Therefore, the searching range is reduced, and the method is more humanized. The search range may be determined according to a coordinate range input by a user, or a range selected by a user frame may be used as the search range.
Therefore, the object corresponding to the target member characteristic is screened out from the two-dimensional graph according to the target member characteristic and is used as a target object, and the target object is highlighted, so that a user can conveniently view the target object, the interface is more concise, and the working efficiency is improved.
Referring to fig. 4, fig. 4 is a sub-flowchart of step S3 in fig. 1.
In some embodiments, the step S3 further includes: step S31, acquiring coordinate areas of all target objects; step S32, judging whether intersecting coordinate areas exist in all the coordinate areas, if the intersecting coordinate areas exist, taking a target object combination corresponding to the intersecting coordinate areas as a target object group, carrying out Boolean summation operation on the coordinate areas of the target object group, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group; step S33, searching coordinate areas with interval distance smaller than a first preset distance among the coordinate areas of all the target objects, taking a target object combination corresponding to the coordinate areas with interval distance smaller than the first preset distance as a target object group, carrying out Boolean summation operation on the coordinate areas of the target object group, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group.
The intersected coordinate areas refer to portions where repeated portions exist in the coordinate areas of the plurality of target objects, namely at least one coordinate exists in the coordinate areas of the plurality of target objects at the same time. Such as intersecting straight lines, intersecting circles, etc. The intersecting coordinate regions also include fully coincident coordinate regions, which means that the coordinate regions are identical.
The target object group is that a plurality of target objects meeting preset conditions are combined into a group, the coordinate areas of the plurality of target objects meeting the preset conditions are subjected to Boolean summation operation, the obtained integral coordinate area is used as the coordinate area of the target object group, the target object group comprises at least two target objects, and the preset conditions comprise intersecting of the coordinate areas, closer spacing distance of the coordinate areas and the like. Each target object group corresponds to a target member.
The first preset distance refers to a preset distance between identical target objects of the identical target member. The first preset distance can be selectively applied according to the requirement, namely, a user can select whether to start the first preset distance when acquiring the coordinates of the target component, and if the user starts the first preset distance, the user needs to input a numerical value corresponding to the first preset distance; for example, when the target member selected by the user is a window, the target member selected by the user is characterized by a vertical frame line of the window, and a distance between two opposite frame lines of the window is 70cm, the first preset distance must not exceed 70cm, and the user may preset the first preset distance to be 75cm. I.e. when the distance between the target objects is less than 75cm, the coordinate ranges of two target objects identified as the same target member.
Specifically, the terminal obtains the coordinate area of each screened target object according to the screened target object.
And detecting according to the coordinate area of each target object, judging whether an intersected coordinate area exists or judging whether a certain coordinate exists in the coordinate areas of a plurality of target objects at the same time.
If intersecting coordinate areas exist or the same coordinate exists and is located in the coordinate areas of a plurality of target objects, indicating that the target objects corresponding to the target areas have intersecting points; combining the intersected multiple target objects to obtain a target object group; and meanwhile, carrying out Boolean summation operation on the intersected multiple coordinate areas to obtain a coordinate area, and taking the coordinate area as the coordinate area of the target object group.
If there is no intersected coordinate area or there is no coordinate area with a certain coordinate located in a plurality of target objects at the same time, or after the boolean summation operation is performed on all intersected coordinate areas, when there is no overlapping coordinate area, the terminal searches coordinate areas with the interval distance between the coordinate areas smaller than the first preset distance in all target objects according to the first preset distance input by the user, namely searches the target objects possibly belonging to the same target component; if two coordinate areas with the interval distance smaller than the first preset distance are found, combining target objects corresponding to the two coordinate areas with the interval distance smaller than the first preset distance to form a target object group; and meanwhile, carrying out Boolean summation operation on the two coordinate areas with the interval distance smaller than the first preset distance, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group.
In other embodiments, the intersecting target objects are combined to obtain a target object group, when a distance between a coordinate area of the target object group and a coordinate area of the target object is smaller than a first preset distance, the target object group and the target object are combined to form a new target object group, a boolean summation operation is performed on the coordinate area of the target object group and the coordinate area of the target object, and the coordinate area after the boolean summation operation is used as the coordinate area of the new target object group.
In other embodiments, when two groups of intersecting target objects exist, a first group of intersecting target objects is combined to obtain a first target object group, a second group of intersecting target objects is combined to obtain a second target object group, and if the distance between the coordinate areas of the first target object group and the coordinate areas of the second target object group is smaller than the first preset distance, the first target object group and the second target object group are combined to form a third target object group, and the coordinate areas of the first target object group and the coordinate areas of the second target object group are subjected to boolean summation operation to obtain the coordinate areas of the third target object group.
Therefore, by searching all target objects which meet the condition that the intersection of the coordinate areas or the interval distance between the coordinate areas is smaller than the first preset distance in all the coordinate areas, combining the target objects to be used as a target object group, and carrying out summation operation on the coordinate areas which meet the condition that the intersection or the interval distance between the coordinate areas is smaller than the first preset distance, the obtained coordinate areas are used as the coordinate areas of the target object group, the integration of the coordinate areas of the target objects is realized, the statistics of the coordinate areas of the target objects is facilitated, the number of independent target objects is reduced, the operation amount of a terminal is reduced, and the accuracy of coordinate statistics is improved.
In an embodiment, the step S3 further includes: step S34, searching coordinate areas with the interval distance between the coordinate areas of the target object group being larger than a second preset distance in the coordinate areas of all the target objects, adding the target object corresponding to the searched coordinate areas into the target object group, carrying out Boolean summation operation on the searched coordinate areas and the coordinate areas of the target object group, and taking the coordinate areas obtained after operation as the coordinate areas of the target object group.
The second preset distance is a distance between two preset target components, and the second preset distance is also selectively applicable according to the needs of a user, namely, the user can select whether to start the second preset distance when acquiring the coordinates of the target components, and if the user starts the second preset distance, the user needs to input a value corresponding to the second preset distance, namely, the interval distance between adjacent target components; for example, when the target member selected by the user is a window, the target member input by the user is characterized by one vertical border line of the window, the distance between two opposite border lines of the window is 70cm, the user can set the first preset distance to be 75cm, and then the sum of the coordinate areas of the two border lines with the distance less than 75cm is used as the coordinate area of the first target member; if the distance between two adjacent windows is 175cm, the user can set the second preset distance design to 170cm. When the distance between the coordinate area of the target object and the coordinate area of the first target component is larger than 170cm, the coordinate area of the target object is considered as the coordinate area of the second target component.
Specifically, the coordinate area of the determined target object group is taken as the coordinate area of the first component; searching coordinate areas with the interval distance between the coordinate areas of all the target objects and the coordinate areas of the target object group being larger than a second preset distance, namely searching whether a second component exists near the coordinate area where the first component exists; if the coordinate area with the distance between the coordinate areas of the target object group being larger than the second preset distance is found, adding the target object corresponding to the coordinate area into the target object group, carrying out Boolean summation operation on the found coordinate area and the coordinate area of the target object group, namely carrying out Boolean summation operation on the coordinate areas of the two components, taking the coordinate area obtained after operation as a common coordinate area after the combination of the first component and the second component, and taking the common coordinate area as a coordinate area of a new target object group.
In other embodiments, the coordinate area with the distance greater than the second preset distance may also be a coordinate area of two target object groups, and in a specific application scenario, the coordinate area obtained by summing the coordinate areas of two target objects with the distance less than the first preset distance is used as a coordinate area of a first target object group, where the coordinate area of the first target object group may be a coordinate area of the first member; summing the coordinate areas of the other two target objects with the interval distance smaller than the first preset distance to obtain a coordinate area serving as the coordinate area of a second target object, wherein the coordinate area of the second target object group can be the coordinate area of a second component; and when the distance between the coordinate area of the first target object group and the coordinate area of the second target object group is larger than a second preset distance, combining the first target object group and the second target object group to form a third target object group, carrying out summation operation on the coordinate area of the first target object group and the coordinate area of the second target object, and taking the coordinate area obtained by operation as the coordinate area of the third target object group. Thereby obtaining the coordinate region after the summation operation of the coordinate region of the first component and the coordinate region of the second component.
Therefore, the coordinate areas of the plurality of components are obtained through Boolean summation operation on the coordinate areas with the interval distance larger than the second preset distance, linkage expansion of the coordinate areas of the plurality of components is realized, and accordingly the coordinate areas of all target components are expanded and selected, and the coordinate areas of the plurality of target components with a certain distance are unified into one coordinate area.
In some embodiments, the step S4 further includes summarizing all the target object groups or coordinate areas of the target objects, where all the obtained coordinate areas are used as coordinate ranges of all the target members in the two-dimensional graph.
In other embodiments, the user may perform a replacement operation on the coordinate ranges of the target members obtained by the combination, that is, the user selects replacement contents, and the terminal replaces the replacement contents input by the user to positions of the coordinate ranges of the target members, respectively. The replacing operation also includes roughening or marking the target member to replace the original target member.
In other embodiments, the user may perform a deletion or hiding operation on the coordinate ranges of the target members obtained by combining, that is, perform a deletion or hiding operation on the objects in the coordinate ranges of all the target members, thereby removing the target members from the two-dimensional graph.
The coordinate ranges of the target components are obtained by combining the coordinate areas of the target object groups, and the user performs unified operation on the coordinate ranges of the target components, so that the unified operation of the user on all the target components in the two-dimensional graph is realized, the drawing efficiency of the two-dimensional graph is improved, and the convenience degree of component modification is increased.
The target member coordinate acquiring method provided by the invention can be implemented in hardware, firmware, or can be implemented as software or computer code which can be stored in a computer readable storage medium such as CD, ROM, RAM, a floppy disk, a hard disk, or a magneto-optical disk, or can be stored as computer code originally stored on a remote recording medium or a non-transitory machine readable medium, downloaded over a network, and stored in a local recording medium, so that the target member coordinate acquiring method described herein can be presented as software stored on a recording medium using a general purpose computer or special processor, or in programmable or special hardware such as an ASIC or FPGA. As can be appreciated in the art, a computer, processor, microprocessor, controller, or programmable hardware includes a memory component, e.g., RAM, ROM, flash memory, etc., which can store or receive software or computer code when accessed and executed by a computer, processor, or hardware implementing one of the target component coordinate acquisition methods described herein. In addition, when a general-purpose computer accesses code for implementing the processes shown herein, execution of the code converts the general-purpose computer into a special-purpose computer for executing the processes shown herein.
Wherein the computer readable storage medium may be a solid state memory, a memory card, an optical disc, etc. The computer readable storage medium stores program instructions for a computer to execute a target member coordinate acquisition method shown in fig. 1 to 4 after being called.
Referring to fig. 5, fig. 5 is a block diagram illustrating a target component coordinate acquisition system 100 according to an embodiment of the invention.
The present invention also provides a target member coordinate acquisition system 100, the two-dimensional graph comprising at least one object; the target member coordinate acquisition system 100 includes: a feature acquisition module 10 for acquiring a target member feature; a target screening module 20, configured to screen, as a target object, an object with a target component feature from all objects according to the target component feature; a coordinate region operation module 30, configured to operate a coordinate region of a target object based on a preset manner, and take the coordinate region obtained by the operation as a coordinate region of a target object group including a plurality of target objects; the range combining module 40 is configured to combine the coordinate areas of all the target object groups to obtain coordinate ranges of all the target members.
Referring to fig. 6, fig. 6 is a block diagram of the feature acquisition module 10 in fig. 5.
In some embodiments, the feature acquisition module 10 includes: an object request module 11, configured to acquire all objects in the two-dimensional graph, and request a user to select an object capable of representing a target member from all objects; the feature selection module 12 is configured to take an object that can represent a target member selected by a user as the target member feature.
Specifically, after a user inputs a target component coordinate acquisition instruction on a two-dimensional drawing interface, the terminal displays all objects in a two-dimensional graph of a current layer and displays a request window; the request window includes at least one component type, which may be a component graphic or a component name, for example: doors, windows, risers, etc.; the request window is further used for guiding a user to select the type of the target component from the types of the components; after the terminal obtains the type of the target component input by the user, highlighting a preset object capable of representing the target component in a request window according to the type of the target component input by the user; and the terminal takes the object which is highlighted in the request window and can represent the target component as the target component characteristic after receiving the confirmation instruction input by the user.
In other embodiments, the request window is used for requesting the user to directly click and select an object capable of representing the target component in the two-dimensional graph, highlighting the object selected by the user in the two-dimensional graph, or copying the object selected by the user into the request window to perform preview display while the user clicks and selects, and the terminal takes the object selected by the user as the characteristic of the target component after receiving the confirmation instruction input by the user through the request window.
Therefore, the object selected by the user in the two-dimensional graph is obtained and used as the characteristic capable of representing the target component, the object selected by the user is used as the searching basis of the target component, a larger selection space is provided for the user, the searching operability is realized, and the characteristic searching possibility of the target component is increased.
Referring to fig. 7, fig. 7 is a block diagram illustrating the structure of the object screening module 20 in fig. 5.
In some embodiments, the target screening module 20 includes: an object acquisition module 21, configured to acquire all objects in the two-dimensional graph; an object searching module 22, configured to search all objects of the two-dimensional graph for an object corresponding to the target component feature as a target object; the object display module 23 is configured to delete the non-target object and keep displaying the target object.
Specifically, after the terminal obtains the target component characteristics input by the user, all objects in the two-dimensional graph are obtained.
And the terminal searches all objects of the two-dimensional graph according to the target object characteristics to obtain the object which corresponds to the target component characteristics and is the same as the target object.
And the terminal takes the objects except all the target objects in the two-dimensional graph as non-target objects according to the searched target objects. And deleting all non-target objects, and keeping and displaying the target objects.
In other embodiments, the terminal highlights the target object after finding the target object. For example, thickening, reddening, etc. the target object; or to ignore the non-target object, such as gray scale, light color display, etc.
In other embodiments, the user inputs a search range at the terminal, and the terminal searches the target object in the search range input by the user according to the target member characteristics; for example, the user selects a certain area as a searching area, the terminal searches the target object only in the searching area, deletes the non-target object in the searching area, and keeps displaying the target object in the facing-the-poster area. Therefore, the searching range is reduced, and the method is more humanized. The search range may be determined according to a coordinate range input by a user, or a range selected by a user frame may be used as the search range.
Therefore, the object corresponding to the target member characteristic is screened out from the two-dimensional graph according to the target member characteristic and is used as a target object, and the target object is highlighted, so that a user can conveniently view the target object, the interface is more concise, and the working efficiency is improved.
Referring to fig. 8, fig. 8 is a block diagram of the coordinate area operation module 30 in fig. 5.
In some embodiments, the coordinate region operation module 30 includes: a coordinate region acquiring module 31, configured to acquire coordinate regions of all target objects; the intersecting object operation module 32 is configured to determine whether intersecting coordinate areas exist in all coordinate areas, and if intersecting coordinate areas exist, use a target object combination corresponding to the intersecting coordinate areas as a target object group, perform boolean summation operation on the coordinate areas of the target object group, and use the coordinate areas after boolean summation operation as the coordinate areas of the target object group; the distance object operation module 33 is configured to search coordinate areas with a distance between the coordinate areas smaller than a first preset distance among the coordinate areas of all the target objects, take a target object group corresponding to the coordinate areas with the distance smaller than the first preset distance as a target object group, perform boolean summation operation on the coordinate areas of the target object group, and take the coordinate areas after boolean summation operation as the coordinate areas of the target object group.
Specifically, the terminal obtains the coordinate area of each screened target object according to the screened target object.
And detecting according to the coordinate area of each target object, judging whether an intersected coordinate area exists or judging whether a certain coordinate exists in the coordinate areas of a plurality of target objects at the same time.
If intersecting coordinate areas exist or the same coordinate exists and is located in the coordinate areas of a plurality of target objects, indicating that the target objects corresponding to the target areas have intersecting points; combining the intersected multiple target objects to obtain a target object group; and meanwhile, carrying out Boolean summation operation on the intersected multiple coordinate areas to obtain a coordinate area, and taking the coordinate area as the coordinate area of the target object group.
If there is no intersected coordinate area or there is no coordinate area with a certain coordinate located in a plurality of target objects at the same time, or after the boolean summation operation is performed on all intersected coordinate areas, when there is no overlapping coordinate area, the terminal searches coordinate areas with the interval distance between the coordinate areas smaller than the first preset distance in all target objects according to the first preset distance input by the user, namely searches the target objects possibly belonging to the same target component; if two coordinate areas with the interval distance smaller than the first preset distance are found, combining target objects corresponding to the two coordinate areas with the interval distance smaller than the first preset distance to form a target object group; and meanwhile, carrying out Boolean summation operation on the two coordinate areas with the interval distance smaller than the first preset distance, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group.
In other embodiments, the intersecting target objects are combined to obtain a target object group, when a distance between a coordinate area of the target object group and a coordinate area of the target object is smaller than a first preset distance, the target object group and the target object are combined to form a new target object group, a boolean summation operation is performed on the coordinate area of the target object group and the coordinate area of the target object, and the coordinate area after the boolean summation operation is used as the coordinate area of the new target object group.
In other embodiments, when two groups of intersecting target objects exist, a first group of intersecting target objects is combined to obtain a first target object group, a second group of intersecting target objects is combined to obtain a second target object group, and if the distance between the coordinate areas of the first target object group and the coordinate areas of the second target object group is smaller than the first preset distance, the first target object group and the second target object group are combined to form a third target object group, and the coordinate areas of the first target object group and the coordinate areas of the second target object group are subjected to boolean summation operation to obtain the coordinate areas of the third target object group.
Therefore, by searching all target objects which meet the condition that the intersection of the coordinate areas or the interval distance between the coordinate areas is smaller than the first preset distance in all the coordinate areas, combining the target objects to be used as a target object group, and carrying out summation operation on the coordinate areas which meet the condition that the intersection or the interval distance between the coordinate areas is smaller than the first preset distance, the obtained coordinate areas are used as the coordinate areas of the target object group, the integration of the coordinate areas of the target objects is realized, the statistics of the coordinate areas of the target objects is facilitated, the number of independent target objects is reduced, the operation amount of a terminal is reduced, and the accuracy of coordinate statistics is improved.
In some embodiments, the coordinate region operation module 30 further includes: a component expansion module 34, configured to search coordinate areas of all the target objects for a coordinate area with a distance greater than a second preset distance from the coordinate areas of the target object group, add the target object corresponding to the searched coordinate area to the target object group, perform boolean summation operation on the searched coordinate area and the coordinate areas of the target object group, and obtain the coordinate area after operation as the coordinate area of the target object group
Specifically, the coordinate area of the determined target object group is taken as the coordinate area of the first component; searching coordinate areas with the interval distance between the coordinate areas of all the target objects and the coordinate areas of the target object group being larger than a second preset distance, namely searching whether a second component exists near the coordinate area where the first component exists; if the coordinate area with the distance between the coordinate areas of the target object group being larger than the second preset distance is found, adding the target object corresponding to the coordinate area into the target object group, carrying out Boolean summation operation on the found coordinate area and the coordinate area of the target object group, namely carrying out Boolean summation operation on the coordinate areas of the two components, taking the coordinate area obtained after operation as a common coordinate area after the combination of the first component and the second component, and taking the common coordinate area as a coordinate area of a new target object group.
In other embodiments, the coordinate area with the distance greater than the second preset distance may also be a coordinate area of two target object groups, and in a specific application scenario, the coordinate area obtained by summing the coordinate areas of two target objects with the distance less than the first preset distance is used as a coordinate area of a first target object group, where the coordinate area of the first target object group may be a coordinate area of the first member; summing the coordinate areas of the other two target objects with the interval distance smaller than the first preset distance to obtain a coordinate area serving as the coordinate area of a second target object, wherein the coordinate area of the second target object group can be the coordinate area of a second component; and when the distance between the coordinate area of the first target object group and the coordinate area of the second target object group is larger than a second preset distance, combining the first target object group and the second target object group to form a third target object group, carrying out summation operation on the coordinate area of the first target object group and the coordinate area of the second target object, and taking the coordinate area obtained by operation as the coordinate area of the third target object group. Thereby obtaining the coordinate region after the summation operation of the coordinate region of the first component and the coordinate region of the second component.
Therefore, the coordinate areas of the plurality of components are obtained through Boolean summation operation on the coordinate areas with the interval distance larger than the second preset distance, linkage expansion of the coordinate areas of the plurality of components is realized, and accordingly the coordinate areas of all target components are expanded and selected, and the coordinate areas of the plurality of target components with a certain distance are unified into one coordinate area.
As shown in fig. 5, in some embodiments, the target member coordinate acquisition system 100 further includes a storage module 50, where the storage module 50 is configured to store data such as a two-dimensional graph, a target object, and a coordinate range of a target member in the target member coordinate acquisition system 100.
The memory module 50 may include a high-speed random access memory, and may further include a nonvolatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), a plurality of disk storage devices, a Flash memory device, or other volatile solid-state storage devices.
Specifically, the storage module 50 is located in the mobile terminal and is mainly connected to the feature acquisition module 10, the target screening module 20, the coordinate area operation module 30, and the range combination module 40, and is configured to store data such as the feature of the target member, the screened target object, the coordinate area of the target object group, and the coordinate range of the target member acquired by the mobile terminal.
In other embodiments, the storage module 50 may also be coupled to each module of the target member coordinate acquisition system 100 for storing data generated by each module during acquisition of the coordinates of the target member.
The feature acquisition module 10, the target screening module 20, the coordinate region operation module 30 and the range combination module 40 in the target member coordinate acquisition system 100 are all arranged in the terminal; the feature selection module 12 in the feature acquisition module 10 is connected with the object acquisition module 21 in the target screening module 20 in a wired or wireless manner, and is used for screening a target object in the two-dimensional graph according to the target component feature selected by the user; the object display module 23 in the target screening module 20 is connected to the coordinate area acquisition module 31 in the coordinate area operation module 30 in a wired or wireless manner, and is configured to acquire the coordinate area of the reserved target object. The intersecting object operation module 32, the distance object operation module 33 and the component expansion module 34 in the coordinate area operation module 30 are all connected with the range combination module 40 in a wired or wireless manner, wherein the storage module 50 is respectively connected with the account feature acquisition module 10, the target screening module 20, the coordinate area operation module 30 and the range combination module 40, and is used for storing data generated in the process of acquiring the coordinates of the target component by the terminal.
The target member coordinate acquiring system 100 provided by the present invention uses the aforementioned target member coordinate acquiring method, and the functions performed by the target member coordinate acquiring system 100 correspond to the steps of the performed target member coordinate acquiring method, and the description of the target member coordinate acquiring method may refer to the relevant content of the aforementioned target member coordinate acquiring method. The respective modules of the target member coordinate acquisition system 100 may be provided in at least one of a terminal and a server.
According to the target component coordinate acquisition method and the target component coordinate acquisition system, the target component characteristics input by a user are acquired, the target objects are screened out from all objects of the two-dimensional graph according to the target component characteristics, then the coordinate areas of the target objects are calculated and grouped to obtain target object groups, and all the target object groups are combined to obtain the coordinate ranges of all the target components, so that the coordinate ranges of the target components are quickly acquired in the two-dimensional graph, and the searching precision of the coordinate ranges of the target components is improved; the screening range is enlarged, the coordinate range of the obtained target component is more comprehensive, the drawing efficiency is improved, and the user experience is improved.
The foregoing is a description of embodiments of the present invention, and it should be noted that, for those skilled in the art, modifications and variations can be made without departing from the principles of the embodiments of the present invention, and such modifications and variations are also considered to be within the scope of the present invention.
Claims (8)
1. The method is used for acquiring the coordinate range of the target component in the two-dimensional graph; wherein the two-dimensional graphic comprises at least one object; the method comprises the following steps:
step S1, obtaining characteristics of a target component;
step S2, screening out objects with target component characteristics from all objects according to the target component characteristics to serve as target objects;
step S3, calculating the coordinate area of the target object based on a preset mode, and taking the coordinate area obtained by calculation as the coordinate area of a target object group comprising a plurality of target objects;
s4, combining the coordinate areas of all the target object groups to obtain the coordinate ranges of all the target components;
wherein, the step S3 includes:
step S31, acquiring coordinate areas of all target objects;
step S32, judging whether intersecting coordinate areas exist in all the coordinate areas, if the intersecting coordinate areas exist, taking a target object combination corresponding to the intersecting coordinate areas as a target object group, carrying out Boolean summation operation on the coordinate areas of the target object group, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group;
Step S33, searching coordinate areas with interval distance smaller than a first preset distance among the coordinate areas of all the target objects, taking a target object combination corresponding to the coordinate areas with interval distance smaller than the first preset distance as a target object group, carrying out Boolean summation operation on the coordinate areas of the target object group, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group.
2. The method for acquiring coordinates of a target member according to claim 1, wherein the step S1 includes:
step S11, acquiring all objects in the two-dimensional graph, and requesting a user to select an object capable of representing a target member from all objects;
and step S12, taking the object which can represent the target component and is selected by the user as the target component characteristic.
3. The method for acquiring coordinates of a target member according to claim 2, wherein the step S2 includes:
s21, acquiring all objects in the two-dimensional graph;
step S22, searching objects corresponding to the characteristics of the target component from all objects of the two-dimensional graph as target objects;
step S23, deleting the non-target object and retaining the display target object.
4. The method for acquiring coordinates of a target member according to claim 1, wherein the step S3 further comprises:
step S34, searching coordinate areas with the interval distance between the coordinate areas of the target object group being larger than a second preset distance in the coordinate areas of all the target objects, adding the target object corresponding to the searched coordinate areas into the target object group, carrying out Boolean summation operation on the searched coordinate areas and the coordinate areas of the target object group, and taking the coordinate areas obtained after operation as the coordinate areas of the target object group.
5. A target member coordinate acquisition system for acquiring a coordinate range of a target member in a two-dimensional graph; wherein the two-dimensional graphic comprises at least one object; the target member coordinate acquisition system includes:
the feature acquisition module is used for acquiring the features of the target component;
the target screening module is used for screening out objects with target component characteristics from all objects according to the target component characteristics to serve as target objects;
the coordinate region operation module is used for operating the coordinate region of the target object based on a preset mode, and taking the coordinate region obtained by operation as the coordinate region of a target object group comprising a plurality of target objects;
The range combination module is used for combining the coordinate areas of all the target object groups to obtain the coordinate ranges of all the target components;
wherein, the coordinate region operation module includes:
the coordinate region acquisition module is used for acquiring the coordinate regions of all the target objects;
the intersecting object operation module is used for judging whether intersecting coordinate areas exist in all the coordinate areas, if so, the target object combination corresponding to the intersecting coordinate areas is used as a target object group, boolean summation operation is carried out on the coordinate areas of the target object group, and the coordinate areas after the Boolean summation operation are used as the coordinate areas of the target object group;
the distance object operation module is used for searching coordinate areas with the interval distance smaller than a first preset distance among the coordinate areas of all the target objects, taking a target object combination corresponding to the coordinate areas with the interval distance smaller than the first preset distance as a target object group, carrying out Boolean summation operation on the coordinate areas of the target object group, and taking the coordinate areas after the Boolean summation operation as the coordinate areas of the target object group.
6. The target member coordinate acquisition system of claim 5, wherein the feature acquisition module comprises:
The object request module is used for acquiring all objects in the two-dimensional graph and requesting a user to select an object capable of representing a target component from all objects;
and the feature selection module is used for taking the object which can represent the target component and is selected by the user as the target component feature.
7. The target member coordinate acquisition system of claim 6, wherein the target screening module comprises:
the object acquisition module is used for acquiring all objects in the two-dimensional graph;
the object searching module is used for searching objects corresponding to the characteristics of the target component from all objects of the two-dimensional graph to serve as target objects;
and the object display module is used for deleting the non-target object and retaining and displaying the target object.
8. The target member coordinate acquisition system of claim 5, wherein the coordinate area operation module further comprises:
the component expansion module is used for searching coordinate areas with the interval distance between the coordinate areas and the coordinate areas of the target object group being larger than a second preset distance in the coordinate areas of all the target objects, adding the target object corresponding to the searched coordinate areas into the target object group, carrying out Boolean summation operation on the searched coordinate areas and the coordinate areas of the target object group, and obtaining the coordinate areas after operation as the coordinate areas of the target object group.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911316105.7A CN111161351B (en) | 2019-12-18 | 2019-12-18 | Target component coordinate acquisition method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911316105.7A CN111161351B (en) | 2019-12-18 | 2019-12-18 | Target component coordinate acquisition method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111161351A CN111161351A (en) | 2020-05-15 |
CN111161351B true CN111161351B (en) | 2023-05-16 |
Family
ID=70557376
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911316105.7A Active CN111161351B (en) | 2019-12-18 | 2019-12-18 | Target component coordinate acquisition method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111161351B (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106446873B (en) * | 2016-11-03 | 2021-01-26 | 北京旷视科技有限公司 | Face detection method and device |
CN109447992B (en) * | 2018-10-23 | 2022-04-01 | 中国银行股份有限公司 | Image segmentation method and device |
-
2019
- 2019-12-18 CN CN201911316105.7A patent/CN111161351B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111161351A (en) | 2020-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108536467B (en) | Code positioning processing method and device, terminal equipment and storage medium | |
CN110287877A (en) | The processing method and processing device of video object | |
CN112233009A (en) | Picture rendering method, device, equipment and storage medium | |
CN112346951B (en) | Service testing method and device | |
CN115097975A (en) | Method, apparatus, device and storage medium for controlling view angle conversion | |
CN111061414A (en) | Skin replacement method and device, electronic equipment and readable storage medium | |
CN113538623A (en) | Method and device for determining target image, electronic equipment and storage medium | |
CN111161351B (en) | Target component coordinate acquisition method and system | |
CN108920343B (en) | Data processing method and device | |
CN110019492B (en) | Information display method and device | |
CN115731442A (en) | Image processing method, image processing device, computer equipment and storage medium | |
CN112306336A (en) | Document content display method and device | |
CN117425887A (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN113902841A (en) | Image drawing method and device, electronic equipment and readable storage medium | |
CN112862453A (en) | Process information display method, apparatus, computer device and storage medium | |
CN112579846A (en) | Visualization method and system for user behavior track | |
CN117409110B (en) | View display method, device, equipment and storage medium | |
CN115934980B (en) | Layout graph search processing method and device, equipment and storage medium | |
CN118332147B (en) | Multi-layer pattern spot data difference comparison method and device and electronic equipment | |
CN114967998A (en) | Operation bar display method, electronic equipment and storage medium | |
CN115543165A (en) | Live data analysis method, device, equipment and computer-readable storage medium | |
CN114218115A (en) | Monkey testing method and device, storage medium and terminal | |
CN118193875A (en) | Page loading method and device, electronic equipment and storage medium | |
CN113989249A (en) | Method and device for detecting signs | |
CN116774958A (en) | Information display method, information display 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 |