Image processing method, device, equipment and medium
By receiving the selection operation in the image processing system and cropping the display target annotation box, the problem of the obscured annotation box cannot be adjusted is solved, and the accurate adjustment of the annotation box in the sample image is achieved and the user experience improvement is achieved.
Patent Information
- Application Number
- CN202111113905.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-23
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-09-23
AI Technical Summary
During the image annotation process, when the marking box overlaps or partially overlaps in the sample image, the obscured marking box cannot be selected and cannot be adjusted effectively.
The target position information is obtained by receiving the selection operation, the target labeling box is determined, and the sub-images it contains are cropped and displayed for adjustment. The specific steps include determining the location information of the center point of each label box, calculating the distance from the target position information, selecting the label box with the smallest distance as the target label box, and cropping and displaying the target label box according to the order of the label box.
It effectively avoids the problem that the obscured label box cannot be selected, allowing users to accurately adjust the obscured label box in the sample image, improving the accuracy and user experience of image labeling.
Smart Images

Figure CN113870388B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, device, equipment and medium. Background Art
[0002] With the popularity of deep learning, more and more intelligent companies, such as Baidu, Alibaba, and Huawei, are launching algorithm platforms. Users can upload sample images on the algorithm platform and annotate the sample images. After the user completes the annotation, the algorithm platform trains the required algorithm model based on the sample images annotated by the user. However, when users annotate sample images, there is often a scene where a sample image needs to be annotated with multiple annotation boxes, such as an image with multiple faces. When users annotate faces, they need to annotate as many annotation boxes as there are faces in the image. However, when users annotate the annotation boxes in the sample images, in order to more accurately determine the corresponding annotation boxes, it is usually necessary to adjust the annotated annotation boxes.
[0003] However, when the annotation boxes in the sample image overlap or partially overlap, the occluded annotation box cannot always be selected, resulting in an inability to effectively adjust the occluded annotation box. Summary of the invention
[0004] The embodiments of the present invention provide an image processing method, apparatus, device and medium, which are used to solve the problem in the prior art that an obscured annotation box in a sample image cannot be effectively adjusted.
[0005] In a first aspect, an embodiment of the present invention provides an image processing method, the method comprising:
[0006] If a selection operation on the sample image is received, obtaining target position information carried by the selection operation;
[0007] According to the target position information and the position information corresponding to the annotation box, the annotation box containing the target position information in the sample image is determined as the target annotation box; according to the position information of the target annotation box, the sub-image contained in the target annotation box is cropped, and the cropped target annotation box is displayed so as to adjust the target annotation box.
[0008] Furthermore, determining the annotation box containing the target position information in the sample image as the target annotation box includes:
[0009] Determine the center point position information of each annotation frame containing the target position information; and determine the distance between the target position information and the center point position information of each annotation frame containing the target position information, and determine the annotation frame with the smallest distance as the target annotation frame.
[0010] Furthermore, after determining the annotation box containing the target position information as the target annotation box and before displaying the target annotation box, the method further includes:
[0011] The sub-image contained in the target marking frame is cropped according to the position information of the target marking frame, and a subsequent display operation is performed on the cropped target marking frame.
[0012] Furthermore, after determining the annotation box containing the target position information as the target annotation box, and before cropping the sub-image contained in the target annotation box according to the position information of the target annotation box, the method further includes:
[0013] According to the order in which each annotation box is annotated, the last annotated target annotation box in the target annotation box is obtained, and for the last annotated target annotation box in the target annotation box, a subsequent operation of cropping a sub-image included in the target annotation box according to position information of the target annotation box is performed.
[0014] Furthermore, the method further comprises:
[0015] If a display collapse operation is received, the sub-image included in the cropped target annotation frame is deleted.
[0016] In a second aspect, an embodiment of the present invention further provides an image processing device, the device comprising:
[0017] An acquisition module, configured to acquire target position information carried by a selection operation on a sample image if a selection operation on the sample image is received;
[0018] The processing module is used to determine the annotation box containing the target position information in the sample image as the target annotation box according to the target position information and the position information corresponding to the annotation box; according to the position information of the target annotation box, crop the sub-image contained in the target annotation box, and display the cropped target annotation box so as to adjust the target annotation box.
[0019] Furthermore, the processing module is specifically used to determine the center point position information of each annotation box containing the target position information; and determine the distance between the target position information and the center point position information of each annotation box containing the target position information, and determine the annotation box with the smallest distance as the target annotation box.
[0020] Furthermore, the processing module is also used to obtain the last marked target marking box in the target marking box according to the order in which each marking box is marked, and to perform a subsequent operation of cropping the sub-image contained in the target marking box according to the position information of the target marking box on the last marked target marking box in the target marking box.
[0021] Furthermore, the processing module is also used to, if a modification operation is received, obtain the other target annotation frames that were last marked in the target annotation frames except the last marked target annotation frame according to the order in which each annotation frame is marked, and crop the sub-images contained in the other target annotation frames according to the position information of the other target annotation frames, and display the cropped other target annotation frames.
[0022] Furthermore, the processing module is further configured to delete the cropped sub-image contained in the target annotation frame if a display collapse operation is received.
[0023] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned image processing methods when executing a computer program stored in the memory.
[0024] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned image processing methods.
[0025] In an embodiment of the present invention, if a selection operation is received, the target position information carried in the selection operation is obtained, and according to the position information corresponding to each annotation box, the annotation box containing the obtained target position information is determined as the target annotation box, and the target annotation box is displayed. In an embodiment of the present invention, after the selection operation is received, each target annotation box containing the target position information carried by the selection operation is displayed, that is, the obscured annotation box is also displayed, which effectively avoids the problem that the obscured annotation box cannot be selected, so that the obscured annotation box in the sample image can be adjusted. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 A schematic diagram of an image processing process provided by an embodiment of the present invention;
[0028] Figure 2 A schematic diagram of a sample image being labeled provided by an embodiment of the present invention;
[0029] Figure 3 A schematic diagram showing a cropped target annotation frame provided by an embodiment of the present invention;
[0030] Figure 4 A schematic diagram of a detailed implementation process of image processing provided by an embodiment of the present invention;
[0031] Figure 5 A schematic diagram of the structure of an image processing device provided by an embodiment of the present invention;
[0032] Figure 6 An electronic device is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Embodiment 1:
[0035] Figure 1 A schematic diagram of an image processing process provided by an embodiment of the present invention, the process includes the following steps:
[0036] S101: If a selection operation on a sample image is received, then target position information carried by the selection operation is obtained.
[0037] The image processing method provided by the embodiment of the present invention is applied to an electronic device, which may be a mobile terminal, an image acquisition device, or a smart device such as a PC.
[0038] In an embodiment of the present invention, the electronic device receives a selection operation on a sample image, and determines the annotation box that the user wants to adjust through the selection operation on the sample image. In order to determine the annotation box that the user wants to adjust, after the electronic device receives the selection operation on the sample image, it obtains the target position information carried by the selection operation, and determines the annotation box that the user wants to adjust through the target position information.
[0039] Among them, if the electronic device is a PC, the selection operation can be that the user selects the annotation box by sliding the mouse on the page of the sample image marked with the annotation box. When the electronic device detects that the mouse is no longer slid, the electronic device is equivalent to receiving the selection operation, that is, the sliding operation is the selection operation, and the position where the mouse last stops in the sample image is the target position information carried in the selection operation. If the electronic device is a mobile terminal, the selection operation can be that the user selects the annotation box by clicking on the page of the sample image marked with the annotation box. When the electronic device receives the click operation, the electronic device is equivalent to receiving the selection operation, that is, the click operation is the selection operation, and the position of the click in the sample image is the target position information carried in the selection operation.
[0040] S102: According to the target position information and the position information corresponding to the annotation box, determine the annotation box containing the target position information in the sample image as the target annotation box; according to the position information of the target annotation box, crop the sub-image contained in the target annotation box, and display the cropped target annotation box so as to adjust the target annotation box.
[0041] In the embodiment of the present invention, the selection operation is usually to select the annotation box that needs to be adjusted from the already marked annotation boxes. Therefore, after obtaining the target position information carried by the selection operation, the electronic device obtains the annotation box containing the obtained target position information in the sample image according to the obtained target position information and the position information corresponding to each already marked annotation box, and determines the obtained annotation box containing the target position information as the target annotation box. That is to say, the target annotation box containing the obtained target position information in the sample image may be the annotation box that the user wants to adjust.
[0042] In order to facilitate the user to select the target annotation frame to be adjusted, in an embodiment of the present invention, when there are multiple target annotation frames to be determined, the sub-image contained in the target annotation frame in the sample image can be cropped according to the position information of the target annotation frame, and the sub-image contained in the target annotation frame can be cropped, and the cropped target annotation frame can be displayed, wherein each cropped target annotation frame can be displayed in a preset detail area respectively, so that the user can select the target annotation frame to be adjusted in the detail area. If the user selects one of the target annotation frames, the target annotation frame can be adjusted. The specific method of adjusting the target annotation frame is a prior art and will not be repeated here. When many annotation frames in the sample image are close to or even overlap, in an embodiment of the present invention, the sub-image contained in the cropped target annotation frame can be tiled and displayed in the detail area, and the user can quickly and accurately select the target annotation frame to be adjusted.
[0043] Among them, the detailed process of determining the annotation box containing the target position information can be: according to the position information corresponding to the already marked annotation box, determine the horizontal coordinate range and the vertical coordinate range corresponding to each annotation box, and judge whether there is a certain annotation box whose corresponding horizontal coordinate range contains the horizontal coordinate of the acquired target position information, and the vertical coordinate range corresponding to the annotation box also contains the vertical coordinate of the acquired target position information. If so, determine that the corresponding annotation box is the target annotation box containing the target position information.
[0044] In an embodiment of the present invention, if a selection operation is received, the target position information carried in the selection operation is obtained, and according to the position information corresponding to each annotation box, the annotation box containing the obtained target position information is determined as the target annotation box, and the target annotation box is displayed. In an embodiment of the present invention, after the selection operation is received, each target annotation box containing the target position information carried by the selection operation is displayed, that is, the obscured annotation box is also displayed, which effectively avoids the problem that the obscured annotation box cannot be selected, so that the obscured annotation box in the sample image can be adjusted.
[0045] Embodiment 2:
[0046] In order to accurately determine the target annotation box, based on the above embodiment, in an embodiment of the present invention, determining the annotation box containing the target position information in the sample image as the target annotation box includes:
[0047] Determine the center point position information of each annotation frame containing the target position information; and determine the distance between the target position information and the center point position information of each annotation frame containing the target position information, and determine the annotation frame with the smallest distance as the target annotation frame.
[0048] In an embodiment of the present invention, when determining the target annotation box, the annotation box that is closest to the target position information among the annotation boxes containing the target position information may be determined as the target annotation box. Specifically, the process of determining the target annotation box may be: first determine the center point position information of each annotation box containing the target position information, wherein the position information corresponding to each annotation box is known, and for each annotation box, the position information of the annotation box may be represented by the position information of the pixel point corresponding to the upper left corner and the pixel point corresponding to the lower right corner of the annotation box in the sample image, if the position information of the pixel point corresponding to the upper left corner of the annotation box is (x1, y1), and the position information of the pixel point corresponding to the lower right corner is (x2, y2), then the position information of the center point of the annotation box is (x3, y3), wherein x3=(x1+x2) / 2, y3=(y1+y2) / 2. After determining the center point position information of each annotation box containing the target position information, determine the distance between the target position information and the center point position information of each annotation box containing the target position information, and obtain the annotation box with the smallest distance value corresponding to each determined distance, and determine the annotation box with the smallest distance value as the target annotation box.
[0049] Figure 2 A schematic diagram of a labeled sample image provided by an embodiment of the present invention.
[0050] Depend on Figure 2 It can be seen that there are many annotated annotation boxes in the sample image, and the annotation boxes overlap or partially overlap. When adjusting the annotation boxes in the sample image, if you want to select an obscured annotation box, you cannot avoid the annotation box that obscures the annotation box, which means that the obscured annotation box is difficult to select.
[0051] Figure 3 A schematic diagram of a target annotation frame after clipping provided by an embodiment of the present invention.
[0052] in Figure 3 The electronic device PC is used as an example to introduce Figure 3 It can be seen that when the user stops the mouse at a certain position, the electronic device is equivalent to receiving a selection operation on the sample image. The electronic device determines the target annotation frame containing the target position information in the annotation frame according to the target position information carried by the selection operation, that is, the position information of the position where the mouse last stopped, and crops the target annotation frame according to the position information of the target annotation frame, and displays the sub-image contained in the cropped target annotation frame in the detail area. Figure 3 It can be seen that there are 5 target annotation boxes containing the target position information. The user can select the annotation box to be adjusted in the details area, thereby avoiding the problem of being unable to select due to the annotation box being blocked.
[0053] Embodiment 3:
[0054] In order to facilitate adjustment of the target annotation box, based on the above embodiments, in an embodiment of the present invention, after determining the annotation box containing the target position information as the target annotation box, and before cropping the sub-image contained in the target annotation box according to the position information of the target annotation box, the method further includes:
[0055] According to the order in which each annotation box is annotated, the last annotated target annotation box in the target annotation box is obtained, and for the last annotated target annotation box in the target annotation box, a subsequent operation of cropping a sub-image included in the target annotation box according to position information of the target annotation box is performed.
[0056] In an embodiment of the present invention, after the electronic device receives an operation of labeling a sample image each time, the order in which each labeling box is labeled is recorded. After determining the target labeling box, the electronic device can obtain the last labeled target labeling box in the target labeling box according to the order in which each labeling box is labeled, which is equivalent to confirming the last labeled target labeling box in the target labeling box as the labeling box that the user wants to adjust, and cropping the sub-image contained in the last labeled target labeling box in the target labeling box, and displaying the last labeled target labeling box in the target labeling box. Among them, when displaying the last labeled target labeling box in the target labeling box, each pixel point in the last labeled target labeling box in the cropped target labeling box can be adjusted to a preset pixel value, so that the target labeling box is highlighted, which is convenient for the user to distinguish the last labeled labeling box in the target labeling box from other labeling boxes, so as to determine whether the last labeled target labeling box is the labeling box that the user wants to adjust.
[0057] Moreover, in an embodiment of the present invention, after determining the last marked target marking box in the target marking box, the last marked target marking box in the target marking box can also be cropped in the above manner, and the sub-image contained in the cropped target marking box is displayed on the upper layer of the sample image, and the sub-image contained in the cropped target marking box is highlighted, which is equivalent to moving the last marked target marking box in the target marking box to the top layer and highlighting it.
[0058] In order to facilitate adjustment of the target annotation frame, based on the above embodiments, in an embodiment of the present invention, the method further includes:
[0059] If a modification operation is received, then, according to the order in which each annotation box is annotated, the other target annotation boxes that are annotated last in the target annotation box except the last annotated target annotation box are obtained, and according to the position information of the other target annotation boxes, the sub-images contained in the other target annotation boxes are cropped, and the cropped other target annotation boxes are displayed.
[0060] Since the last target annotation box marked in the target annotation box is not necessarily the annotation box that the user wants to adjust, the electronic device can also receive modification operations. If the electronic device is a PC, the modification operation can be that the electronic device detects that the mouse performs a preset operation such as right-clicking. If the electronic device is a mobile terminal, the modification operation can be that the electronic device detects that the user performs a preset sliding operation on the screen.
[0061] When the electronic device receives the modification operation, the electronic device can determine that the last marked target marking box in the target marking box is not the marking box that the user wants to adjust. The electronic device obtains the other last marked target marking boxes in the target marking box except the last marked target marking box according to the order in which each marking box is marked. The electronic device determines that the other target marking boxes are the target marking boxes that the user wants to adjust. Therefore, the electronic device crops the sub-image contained in the other marking boxes according to the position information of the other marking boxes, and displays the cropped other target marking boxes, so that the user can further confirm whether the target marking box is the marking box that the user wants to adjust.
[0062] Furthermore, in the embodiment of the present invention, when there is only one target marking box, the target marking box is directly displayed, that is, the user can directly select the target marking box and use the target marking box as the operation target.
[0063] When displaying the target annotation box, the sub-image contained in the target annotation box can also be cropped, the sub-image contained in the target annotation box that is last annotated in the target annotation box is moved to the upper layer of the sample image, and the sub-image contained in the target annotation box other than the last annotated target annotation box is displayed in the detail area. Therefore, in the embodiment of the present invention, abnormal conditions such as the annotation boxes being close or even overlapping can be effectively handled. And because in the embodiment of the present invention, after receiving the selection operation, a annotation box is selected by default for the user, and all optional annotation boxes are listed in the detail area so that the user can select the annotation box that he wants to adjust, it avoids the occurrence of "selecting one, finding that it is not what the user wants, and after carefully reselecting, finding that it is not what the user wants" and the extremely poor user experience. In other words, in the embodiment of the present invention, the possibility of misoperation is reduced.
[0064] In order to reduce resource waste, based on the above embodiments, in an embodiment of the present invention, the method further includes:
[0065] If a display collapse operation is received, the sub-image included in the cropped target annotation frame is deleted.
[0066] In an embodiment of the present invention, after the sub-image included in the target annotation box in the sample image is cropped, the sub-image included in the cropped target annotation box will occupy the memory of the electronic device, so when any target annotation box containing the target position information is no longer adjusted, the electronic device can receive a display retracting operation, and after receiving the display retracting operation, the electronic device deletes the sub-image included in the target annotation box currently displayed after the cropping. The display retracting operation can be a preset click operation in the detail area.
[0067] Embodiment 4:
[0068] The image process provided by the embodiment of the present invention is described in detail below in conjunction with a specific embodiment, wherein the annotation box containing the target position information is taken as the target annotation box, and when there are multiple target annotation boxes, the sub-image contained in the last annotated target annotation box is moved to the upper layer of the sample image, and the sub-images contained in the target annotation boxes other than the last annotated target annotation box are displayed in the details area as an example for introduction.
[0069] Figure 4 A detailed implementation process diagram of an image processing provided by an embodiment of the present invention includes:
[0070] S401: Receive a selection operation, and obtain target location information carried by the selection operation.
[0071] S402: Determine the annotation box containing the target position information as the target annotation box.
[0072] S403: Determine whether there is only one target annotation box, if so, execute S404, if not, execute S405.
[0073] S404: Display the target annotation frame.
[0074] The user can directly select the target marking box and use the target marking box as the operation target.
[0075] S405: Crop the sub-image contained in the target annotation box, and execute S406.
[0076] S406: The sub-image included in the last marked target mark frame in the target mark frame is moved to the upper layer of the sample image, and the sub-images included in the target mark frames other than the last marked target mark frame are displayed in the detail area.
[0077] The user may directly adjust the last marked target annotation frame, or may select the target annotation frame to be adjusted in the details area.
[0078] Embodiment 5:
[0079] Figure 5 A schematic diagram of the structure of an image processing device provided by an embodiment of the present invention, the device comprising:
[0080] The acquisition module 501 is used for acquiring the target position information carried by the selection operation if a selection operation on the sample image is received;
[0081] The processing module 502 is used to determine the annotation box containing the target position information in the sample image as the target annotation box according to the target position information and the position information corresponding to the annotation box; crop the sub-image contained in the target annotation box according to the position information of the target annotation box, and display the cropped target annotation box so as to adjust the target annotation box.
[0082] In a possible implementation, the processing module 502 is specifically used to determine the center point position information of each annotation box containing the target position information; and determine the distance between the target position information and the center point position information of each annotation box containing the target position information, and determine the annotation box with the smallest distance as the target annotation box.
[0083] In a possible implementation, the processing module 502 is further used to obtain the last marked target marking box in the target marking box according to the order in which each marking box is marked, and to perform a subsequent cropping operation on the sub-image contained in the target marking box according to the position information of the target marking box.
[0084] In a possible implementation, the processing module 502 is further configured to, if a modification operation is received, obtain other target annotation frames that were last marked in the target annotation frames except for the last marked target annotation frame according to the order in which each annotation frame was marked, and crop the sub-images included in the other target annotation frames according to the position information of the other target annotation frames, and display the cropped other target annotation frames.
[0085] In a possible implementation manner, the processing module 502 is further configured to delete the cropped sub-image included in the target annotation box if a display collapse operation is received.
[0086] Embodiment 6:
[0087] Based on the above embodiments, an embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes: a processor 601 , a communication interface 602 , a memory 603 and a communication bus 606 , wherein the processor 601 , the communication interface 602 , and the memory 603 communicate with each other via the communication bus 606 .
[0088] The memory 603 stores a computer program. When the program is executed by the processor 601, the processor 601 performs the following steps:
[0089] If a selection operation on the sample image is received, obtaining target position information carried by the selection operation;
[0090] According to the target position information and the position information corresponding to the annotation box, the annotation box containing the target position information in the sample image is determined as the target annotation box; according to the position information of the target annotation box, the sub-image contained in the target annotation box is cropped, and the cropped target annotation box is displayed so as to adjust the target annotation box.
[0091] In a possible implementation manner, determining the annotation box containing the target position information in the sample image as the target annotation box includes:
[0092] Determine the center point position information of each annotation frame containing the target position information; and determine the distance between the target position information and the center point position information of each annotation frame containing the target position information, and determine the annotation frame with the smallest distance as the target annotation frame.
[0093] In a possible implementation, after determining the annotation box containing the target position information as the target annotation box and before cropping the sub-image contained in the target annotation box according to the position information of the target annotation box, the method further includes:
[0094] According to the order in which each annotation box is annotated, the last annotated target annotation box in the target annotation box is obtained, and for the last annotated target annotation box in the target annotation box, a subsequent operation of cropping a sub-image included in the target annotation box according to position information of the target annotation box is performed.
[0095] In a possible implementation, after displaying the target annotation frame, the method further includes:
[0096] If a modification operation is received, then, according to the order in which each annotation box is annotated, the other target annotation boxes that are annotated last in the target annotation box except the last annotated target annotation box are obtained, and according to the position information of the other target annotation boxes, the sub-images contained in the other target annotation boxes are cropped, and the cropped other target annotation boxes are displayed.
[0097] In a possible implementation, the method further includes:
[0098] If a display collapse operation is received, the sub-image included in the cropped target annotation frame is deleted.
[0099] The communication bus mentioned in the above server can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0100] The communication interface 602 is used for communication between the electronic device and other devices.
[0101] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0102] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0103] Embodiment 7:
[0104] On the basis of the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device implements the following steps when executing:
[0105] The memory stores a computer program, and when the program is executed by the processor, the processor performs the following steps:
[0106] If a selection operation on the sample image is received, obtaining target position information carried by the selection operation;
[0107] According to the target position information and the position information corresponding to the annotation box, the annotation box containing the target position information in the sample image is determined as the target annotation box; according to the position information of the target annotation box, the sub-image contained in the target annotation box is cropped, and the cropped target annotation box is displayed so as to adjust the target annotation box.
[0108] In a possible implementation manner, determining the annotation box containing the target position information in the sample image as the target annotation box includes:
[0109] Determine the center point position information of each annotation frame containing the target position information; and determine the distance between the target position information and the center point position information of each annotation frame containing the target position information, and determine the annotation frame with the smallest distance as the target annotation frame.
[0110] In a possible implementation, after determining the annotation box containing the target position information as the target annotation box and before cropping the sub-image contained in the target annotation box according to the position information of the target annotation box, the method further includes:
[0111] According to the order in which each annotation box is annotated, the last annotated target annotation box in the target annotation box is obtained, and for the last annotated target annotation box in the target annotation box, a subsequent operation of cropping a sub-image included in the target annotation box according to position information of the target annotation box is performed.
[0112] In a possible implementation, after displaying the target annotation frame, the method further includes:
[0113] If a modification operation is received, then, according to the order in which each annotation box is annotated, the other target annotation boxes that are annotated last in the target annotation box except the last annotated target annotation box are obtained, and according to the position information of the other target annotation boxes, the sub-images contained in the other target annotation boxes are cropped, and the cropped other target annotation boxes are displayed.
[0114] In a possible implementation, the method further includes:
[0115] If a display collapse operation is received, the sub-image included in the cropped target annotation frame is deleted.
[0116] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0120] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An image processing method, It is characterized in that The method comprises: If a selection operation on the sample image is received, obtaining target position information carried by the selection operation; According to the target position information and the position information corresponding to the annotation frame, the annotation frame in the sample image containing the target position information is determined as the target annotation frame; according to the position information of the target annotation frame, the sub-image contained in the target annotation frame is cropped, and the cropped target annotation frame is displayed so as to adjust the target annotation frame; Wherein, after determining the annotation box containing the target position information as the target annotation box, and before cropping the sub-image contained in the target annotation box according to the position information of the target annotation box, the method further includes: According to the order in which each annotation box is annotated, the last annotated target annotation box in the target annotation box is obtained, and for the last annotated target annotation box in the target annotation box, a subsequent operation of cropping a sub-image included in the target annotation box according to the position information of the target annotation box is performed; Wherein, after displaying the cropped target annotation frame, the method further comprises: If a modification operation is received, then, according to the order in which each annotation box is annotated, the other target annotation boxes that are annotated last in the target annotation box except the last annotated target annotation box are obtained, and according to the position information of the other target annotation boxes, the sub-images contained in the other target annotation boxes are cropped, and the cropped other target annotation boxes are displayed.
2. The method according to claim 1, It is characterized in that The step of determining the annotation frame containing the target position information in the sample image as the target annotation frame comprises: Determine the center point position information of each annotation frame containing the target position information; and determine the distance between the target position information and the center point position information of each annotation frame containing the target position information, and determine the annotation frame with the smallest distance as the target annotation frame.
3. The method according to claim 1, It is characterized in that The method further comprises: If a display collapse operation is received, the sub-image included in the cropped target annotation box is deleted.
4. An image processing device, It is characterized in that The device comprises: an acquisition module, configured to acquire target position information carried by a selection operation on a sample image if a selection operation on the sample image is received; a processing module, configured to determine, according to the target position information and the position information corresponding to the annotation frame, the annotation frame in the sample image containing the target position information as the target annotation frame; crop the sub-image contained in the target annotation frame according to the position information of the target annotation frame, and display the cropped target annotation frame so as to adjust the target annotation frame; The processing module is further used to obtain the last marked target mark frame in the target mark frame according to the order in which each mark frame is marked, and to perform a subsequent operation of cropping the sub-image contained in the target mark frame according to the position information of the target mark frame on the last marked target mark frame in the target mark frame; Wherein, the processing module is further used for, if a modification operation is received, obtaining the other target annotation frames that were last marked in the target annotation frame except the last marked target annotation frame according to the order in which each annotation frame was marked, and cropping the sub-images contained in the other target annotation frames according to the position information of the other target annotation frames, and displaying the cropped other target annotation frames.
5. The device according to claim 4, It is characterized in that The processing module is specifically used to determine the center point position information of each annotation box containing the target position information; and determine the distance between the target position information and the center point position information of each annotation box containing the target position information, and determine the annotation box with the smallest distance as the target annotation box.
6. An electronic device, It is characterized in that The electronic device comprises at least a processor and a memory, and the processor is configured to execute the steps of the image processing method according to any one of claims 1 to 3 when executing a computer program stored in the memory.
7. A computer-readable storage medium, It is characterized in that The computer program is stored therein, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 3 are executed.
