Method for distinguishing objects, computer device and storage medium

By using two image segmentation models to process vehicle roadways and sidewalks separately, and further segmentation is carried out in combination with coordinate information, the problem of poor segmentation of vehicle roadways and sidewalks in the road detection in the prior art is solved, and more efficient road detection is achieved.

CN114663844BActive Publication Date: 2025-05-09FU TAI HUA IND SHENZHEN +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011531617.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-22
Publication Date
2025-05-09
Estimated Expiration
2040-12-22

AI Technical Summary

Technical Problem

The prior art is difficult to effectively divide the vehicle roadway and the sidewalk in road inspection, resulting in insufficient detection speed and accuracy.

Method used

Two image segmentation models are used to segment the roadway and the sidewalk respectively, and the objects are further segmented through coordinate information to realize road detection in real-time images.

Benefits of technology

Improve the effect of image segmentation and the accuracy of road detection, and improve the detection speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114663844B_ABST
    Figure CN114663844B_ABST
Patent Text Reader

Abstract

The present invention provides a method for distinguishing objects, comprising: segmenting the area occupied by a first object in a test image from other areas in the test image to obtain a first segmented image; segmenting the area occupied by a second object in the test image from other areas in the test image to obtain a second segmented image; segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image to obtain a third segmented image. The present invention also provides a computer device and a storage medium for implementing the method for distinguishing objects. The present invention can segment a roadway, a sidewalk, and a gap between a roadway and a sidewalk based on an image to achieve road detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for distinguishing objects, a computer device and a storage medium. Background Art

[0002] Road detection is one of the most basic and important research contents in the fields of vehicle assisted driving. How to improve the detection speed and accuracy is particularly important. Summary of the invention

[0003] In view of the above, it is necessary to provide a method for distinguishing objects, a computer device and a storage medium, which can segment the roadway and the sidewalk based on real-time images, thereby achieving road detection while improving the image segmentation effect.

[0004] The method for distinguishing objects includes: using a first image segmentation model to segment the area occupied by a first object in a test image from other areas in the test image, thereby obtaining a first segmented image; using a second image segmentation model to segment the area occupied by a second object in the test image from other areas in the test image, thereby obtaining a second segmented image; based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, segmenting the first object and the second object, thereby obtaining a third segmented image.

[0005] Preferably, the method further includes: collecting multiple sample images, each of the multiple sample images includes the first object and the second object; performing a first labeling operation on each of the multiple sample images, thereby obtaining multiple sample images subjected to the first labeling operation, and using the multiple sample images subjected to the first labeling operation as a first training sample set, wherein the first labeling operation refers to labeling the first object included in the sample images; performing a second labeling operation on each of the multiple sample images, thereby obtaining multiple sample images subjected to the second labeling operation, and using the multiple sample images subjected to the second labeling operation as a second training sample set, wherein the second labeling operation refers to labeling the second object included in the sample images; training a neural network using the first training sample set to obtain the first image segmentation model; and training the neural network using the second training sample set to obtain the second image segmentation model.

[0006] Preferably, the first object includes two sub-objects; the second object is different from the first object; and the second object is an object whose position in the test image is between the positions of the two sub-objects.

[0007] Preferably, the segmenting of the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining the third segmented image includes: acquiring the coordinates of the first object in the first segmented image; marking the first object in the second segmented image based on the coordinates of the first object in the first segmented image, and using the marked second segmented image as the third segmented image.

[0008] Preferably, the first object and the second object are segmented based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining the third segmented image, including: obtaining the coordinates of the second object in the second segmented image; marking the second object in the first segmented image based on the coordinates of the second object in the second segmented image, and using the marked first segmented image as the third segmented image.

[0009] Preferably, the first object and the second object are segmented based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image, including: creating a reference image; obtaining the coordinates of the first object in the first segmented image; obtaining the coordinates of the second object in the second segmented image; marking the first object and the second object in the reference image based on the coordinates of the first object in the first segmented image and the coordinates of the second object in the second segmented image, and using the marked reference image as the third segmented image.

[0010] Preferably, the size of the reference image is the same as that of the test image, and the RGB values ​​of each pixel of the reference image are the same.

[0011] Preferably, marking the first object and the second object in the reference image includes: adjusting the RGB value of the pixel point corresponding to the first target coordinate in the reference image to a first preset value, wherein the first target coordinate refers to the coordinate in the reference image that is the same as the coordinate of the first object in the first segmented image; and adjusting the RGB value of the pixel point corresponding to the second target coordinate in the reference image to a second preset value, wherein the second target coordinate refers to the coordinate in the reference image that is the same as the coordinate of the second object in the second segmented image.

[0012] The computer device includes a memory and at least one processor. The memory stores at least one instruction. When the at least one instruction is executed by the at least one processor, the method for distinguishing objects is implemented.

[0013] The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for distinguishing objects is implemented.

[0014] Compared with the prior art, the method, computer device and storage medium for distinguishing objects can segment the road and the sidewalk based on real-time images, thereby achieving road detection while improving the image segmentation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a structural diagram of a computer device according to a preferred embodiment of the present invention.

[0016] Figure 2 It is a functional module diagram of a system for distinguishing objects in a preferred embodiment of the present invention.

[0017] Figure 3 It is a flow chart of a method for distinguishing objects according to a preferred embodiment of the present invention.

[0018] Figure 4A Example test images are given.

[0019] Figure 4B An example is given of segmenting the areas respectively occupied by the roadway and the sidewalk in the test image from other areas of the test image.

[0020] Figure 4C An example is given of segmenting the gap between the roadway and the sidewalk from other areas of the test image.

[0021] Figure 4D An example is given to illustrate the segmentation of a roadway, a sidewalk, and a gap between the roadway and the sidewalk.

[0022] Main component symbols

[0023]

[0024]

[0025] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0026] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The described embodiments are only some embodiments of the present invention, rather than all embodiments.

[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0029] See also Figure 1 , which is an architectural diagram of a computer device provided in a preferred embodiment of the present invention.

[0030] In this embodiment, the computer device 3 includes a memory 31, at least one processor 32, a camera 33, and a display screen 34, which are electrically connected to each other. The computer device 3 may be a vehicle-mounted computer.

[0031] Those skilled in the art should understand that Figure 1 The structure of the computer device 3 shown does not constitute a limitation of the embodiment of the present invention. The computer device 3 may also include Figure 1 More or less other hardware or software, or a different arrangement of components.

[0032] It should be noted that the computer device 3 is only an example, and other existing or future computer devices that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.

[0033] In some embodiments, the memory 31 can be used to store the program code and various data of the computer program. For example, the memory 31 can be used to store the system 30 for distinguishing objects installed in the computer device 3, and realize high-speed and automatic access to programs or data during the operation of the computer device 3. The memory 31 can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other non-volatile computer-readable storage medium that can be used to carry or store data.

[0034] In some embodiments, the at least one processor 32 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or it may be composed of multiple packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The at least one processor 32 is the control core (Control Unit) of the computer device 3, and uses various interfaces and lines to connect the various components of the entire computer device 3. It executes programs or modules or instructions stored in the memory 31, and calls data stored in the memory 31 to execute various functions of the computer device 3 and process data, such as the function of distinguishing different objects in the image (such as lanes and sidewalks in street view images, and the gaps between lanes and sidewalks). For specific details, see the following page. Figure 3 Introduction.

[0035] In this embodiment, the system 30 for distinguishing objects may include one or more modules, which are stored in the memory 31 and executed by at least one or more processors (processor 32 in this embodiment) to achieve the function of distinguishing different objects in the image (such as the roadway and the sidewalk in the street view image, and the gap between the roadway and the sidewalk). For details, see the following Figure 3 Introduction.

[0036] In this embodiment, the object distinguishing system 30 can be divided into multiple modules according to the functions performed by them. Figure 2 As shown, the multiple modules include a segmentation module 301 and an execution module 302. The module referred to in the present invention refers to a series of computer-readable instruction segments that can be executed by at least one processor (such as processor 32) and can complete fixed functions, which are stored in a memory (such as memory 31 of computer device 3). In this embodiment, the functions of each module will be described in detail later. Figure 3 Describe in detail.

[0037] In this embodiment, the integrated unit implemented in the form of a software function module can be stored in a non-volatile readable storage medium. The above-mentioned software function module includes one or more computer-readable instructions, and the computer device 3 or a processor implements part of the method of each embodiment of the present invention by executing the one or more computer-readable instructions, such as Figure 3 The method shown is for distinguishing different objects in an image (such as roads and sidewalks in a street view image, and gaps between roads and sidewalks).

[0038] In a further embodiment, in combination Figure 2 The at least one processor 32 can execute various application programs (such as the system 30 for distinguishing objects), program codes, etc. installed in the computer device 3.

[0039] In a further embodiment, the memory 31 stores program codes of a computer program, and the at least one processor 32 can call the program codes stored in the memory 31 to execute related functions. For example, Figure 2 The modules of the object distinguishing system 30 are program codes stored in the memory 31 and executed by the at least one processor 32, so as to realize the functions of the modules to distinguish different objects in the image (such as the roadway and the sidewalk in the street view image, and the gap between the roadway and the sidewalk). Figure 3 Description.

[0040] In one embodiment of the present invention, the memory 31 stores one or more computer-readable instructions, and the one or more computer-readable instructions are executed by the at least one processor 32 to achieve the purpose of distinguishing different objects in the image (such as the roadway and the sidewalk in the street view image, and the gap between the roadway and the sidewalk). Specifically, the specific implementation method of the at least one processor 32 for the above-mentioned computer-readable instructions is detailed in the following description. Figure 3 Description.

[0041] Figure 3 It is a flow chart of a method for distinguishing objects provided by a preferred embodiment of the present invention.

[0042] In this embodiment, the method for distinguishing objects can be applied to a computer device 3. For a computer device 3 that needs to distinguish different objects in an image (such as lanes and sidewalks in a street view image, and the gaps between lanes and sidewalks), the function for distinguishing objects provided by the method of the present invention can be directly integrated on the computer device 3, or run on the computer device 3 in the form of a software development kit (SDK).

[0043] like Figure 3 As shown, the method for distinguishing objects specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0044] Step S1 : The segmentation module 301 uses a first image segmentation model to segment the area occupied by the first object in the test image from other areas in the test image, thereby obtaining a first segmented image.

[0045] It should be noted that the “other areas in the test image” mentioned in this step refers to areas in the test image other than the area occupied by the first object.

[0046] In this embodiment, the first object includes two sub-objects.

[0047] In one embodiment, the test image may be an image captured in real time by the computer device 3 using the camera 33 .

[0048] Taking the computer device 3 as an onboard computer as an example, the test image may be a street scene image of the vehicle in the driving environment captured by the camera 33 (for example Figure 4A Test image 4 is shown). The onboard computer is installed in the vehicle (not shown in the figure).

[0049] Taking the test image as a street view image as an example, the two sub-objects included in the first object may be a road and a sidewalk.

[0050] In this embodiment, the first image segmentation model segments the regions respectively occupied by the two sub-objects in the test image from other regions of the test image, where the other regions of the test image refer to the regions other than the two sub-objects in the test image.

[0051] For example, see Figure 4B As shown, the first image segmentation model segments the areas respectively occupied by the roadway 41 and the sidewalk 42 in the test image 4 from other areas of the test image 4 , thereby obtaining a first segmented image 51 .

[0052] In this embodiment, the first image segmentation model is an image semantic segmentation model. The step of obtaining the first image segmentation model by training the segmentation module 301 using training samples will be described later.

[0053] Step S2: The segmentation module 301 uses a second image segmentation model to segment the area occupied by the second object in the test image from other areas in the test image, thereby obtaining a second segmented image.

[0054] It should be noted that the “other areas in the test image” mentioned in this step refers to areas in the test image except the area occupied by the second object.

[0055] In this embodiment, the second object is different from the first object. The second object refers to an object in the test image whose position is between the positions of the two sub-objects.

[0056] Similarly, taking the test image as a street view image as an example, the second object may be a gap between a road and a sidewalk.

[0057] For example, see Figure 4C As shown, the second image segmentation model segments the gap 43 between the roadway and the sidewalk from other areas of the test image 4 , thereby obtaining a second segmented image 52 .

[0058] In this embodiment, the second image segmentation model may also be an image semantic segmentation model.

[0059] In this embodiment, the segmentation module 301 can use training samples to train a neural network to obtain the first image segmentation model and the second image segmentation model.

[0060] Specifically, the step of using the training samples to train the neural network to obtain the first image segmentation model and the second image segmentation model includes (a1)-(a4):

[0061] (a1) collecting a plurality of sample images, each of the plurality of sample images including the first object and the second object.

[0062] In this embodiment, the first object includes two sub-objects. The second object is different from the first object. The second object is an object located between the positions of the two sub-objects in the sample image.

[0063] Taking each sample image as a street view image as an example, the first object corresponding to each sample image includes two sub-objects, namely a roadway and a sidewalk, and the second object included in each sample image may refer to the gap between the roadway and the sidewalk.

[0064] (a2) performing a first labeling operation on each of the plurality of sample images, thereby obtaining a plurality of sample images that have undergone the first labeling operation, and using the plurality of sample images that have undergone the first labeling operation as a first training sample set, wherein the first labeling operation refers to labeling the first object included in the sample image.

[0065] It should be noted that, when the first object includes two sub-objects, the two sub-objects included in the sample image are marked respectively, that is, the marks corresponding to the two sub-objects are different.

[0066] (a3) performing a second labeling operation on each of the plurality of sample images, thereby obtaining a plurality of sample images that have undergone the second labeling operation, and using the plurality of sample images that have undergone the second labeling operation as a second training sample set, wherein the second labeling operation refers to labeling the second object included in the sample image.

[0067] It should be noted that in this step, the second labeling operation is performed on each sample image collected in (a1), that is, the second labeling operation is not performed on the sample image that has been subjected to the first labeling operation in (a2).

[0068] (a4) using the first training sample set to train a neural network to obtain the first image segmentation model; and using the second training sample set to train the neural network to obtain the second image segmentation model.

[0069] The neural network may be a convolutional neural network.

[0070] It should be noted that using training samples to train a neural network to obtain an image segmentation model is a prior art in the art and will not be described in detail here.

[0071] Step S3: The execution module 302 segments the first object and the second object based on the coordinates of the first object in the first segmented image and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image.

[0072] In the first embodiment, segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image includes (b1)-(b2):

[0073] (b1) Acquire the coordinates of the second object in the second segmented image.

[0074] The coordinates of the second object in the second segmented image refer to the coordinates of each pixel point of the area occupied by the second object in the second segmented image.

[0075] (b2) marking the second object in the first segmented image based on the coordinates of the second object in the second segmented image, and using the marked first segmented image as the third segmented image.

[0076] For example, see Figure 4D As shown, the execution module 302 marks the gap 43 between the roadway and the sidewalk in the first segmented image 51 based on the coordinates of the gap 43 between the roadway and the sidewalk in the second segmented image 52 , thereby obtaining a third segmented image 53 .

[0077] In this embodiment, marking the second object in the first segmented image may refer to filling a position corresponding to the second object in the first segmented image with a preset color.

[0078] In a second embodiment, segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image includes (c1)-(c2):

[0079] (c1) Acquire the coordinates of the first object in the first segmented image.

[0080] Specifically, the coordinates of the first object in the first segmented image refer to the coordinates of each pixel point of the area occupied by the first object in the first segmented image.

[0081] (c2) marking the first object in the second segmented image based on the coordinates of the first object in the first segmented image, and using the marked second segmented image as the third segmented image.

[0082] Similarly, marking the first object in the second segmented image may refer to filling the position of the first object in the second segmented image with a color. It should be noted that when the first object includes two sub-objects, the positions corresponding to the two sub-objects in the second segmented image may be filled with two different colors respectively.

[0083] In a third embodiment, segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image includes (d1)-(d4):

[0084] (d1) Create a reference image.

[0085] In one embodiment, the size of the reference image is the same as that of the test image, and the RGB values ​​of each pixel of the reference image are the same.

[0086] In this embodiment, the RGB value of each pixel of the reference image is (0, 0, 0).

[0087] (d2) Acquire the coordinates of the first object in the first segmented image.

[0088] Specifically, the coordinates of the first object in the first segmented image refer to the coordinates of each pixel point of the area occupied by the first object in the first segmented image.

[0089] (d3) Acquire the coordinates of the second object in the second segmented image.

[0090] Similarly, the coordinates of the second object in the second segmented image refer to the coordinates of each pixel point of the area occupied by the second object in the second segmented image.

[0091] (d4) Based on the coordinates of the first object in the first segmented image and the coordinates of the second object in the second segmented image, the first object and the second object are marked in the reference image, and the marked reference image is used as the third segmented image.

[0092] In one embodiment, marking the first object and the second object in the reference image includes:

[0093] Adjusting the RGB value of a pixel corresponding to a first target coordinate in the reference image to a first preset value, wherein the first target coordinate refers to a coordinate in the reference image that is the same as the coordinate of the first object in the first segmented image; and

[0094] The RGB value of the pixel corresponding to the second target coordinates in the reference image is adjusted to a second preset value, wherein the second target coordinates refer to coordinates in the reference image that are the same as the coordinates of the second object in the second segmented image.

[0095] It should be noted that the first preset value is different from the second preset value. Thus, in the reference image, the RGB value of the pixel point corresponding to the first object and the RGB value of the pixel point corresponding to the second object are set to different values ​​to achieve the segmentation of the first object and the second object. For example, the first preset value may be (255, 255, 0). The second preset value may be (192, 192, 192).

[0096] In one embodiment, the execution module 302 further displays the third segmented image on the display screen 34 .

[0097] In one embodiment, the execution module 302 further performs a control operation based on the third segmented image.

[0098] Taking the case where the computer device 3 is a vehicle-mounted computer and the second object is a gap between a roadway and a sidewalk as an example, the execution module 302 can identify the distance between the vehicle and the gap, and issue a prompt when the distance is less than a preset value to prompt the driver to maintain the distance between the vehicle and the sidewalk. With this prompt, it is convenient for the driver to pay attention to the distance between the vehicle and the sidewalk in time during driving / reversing, thereby improving driving safety.

[0099] For another example, in an unmanned vehicle, the execution module 302 may adjust the vehicle's driving direction or control the vehicle's driving speed, such as slowing down, when the distance is less than a preset value.

[0100] It should be noted that the execution module 302 may use a radar (not shown in the figure) to detect the distance between the vehicle and the gap; or use the image captured by the camera 33 to identify the distance between the vehicle and the gap.

[0101] It should also be noted that the present invention is described by taking the segmentation of a roadway, a sidewalk, and a gap between a roadway and a sidewalk as an example. Based on the above method steps of the present invention, those skilled in the art should also understand that the present invention can also be used for segmentation of multiple objects included in any image.

[0102] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0103] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0105] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for distinguishing objects, characterized in that: The method includes: Using a first image segmentation model, segmenting an area occupied by a first object in a test image from other areas in the test image, thereby obtaining a first segmented image, wherein the first object includes two sub-objects; Using a second image segmentation model, segment an area occupied by a second object in the test image from other areas in the test image, thereby obtaining a second segmented image, wherein the second object is different from the first object; the second object is an object located between the positions of the two sub-objects in the test image; Based on the coordinates of the first object in the first segmented image and / or the coordinates of the second object in the second segmented image, the first object and the second object are segmented to obtain a third segmented image.

2. The method for distinguishing objects according to claim 1, characterized in that: The method further includes: Collecting a plurality of sample images, each of the plurality of sample images including the first object and the second object; Performing a first marking operation on each of the plurality of sample images, thereby obtaining a plurality of sample images that have undergone the first marking operation, and using the plurality of sample images that have undergone the first marking operation as a first training sample set, wherein the first marking operation refers to marking the first object included in the sample image; Performing a second marking operation on each of the plurality of sample images, thereby obtaining a plurality of sample images that have undergone the second marking operation, and using the plurality of sample images that have undergone the second marking operation as a second training sample set, wherein the second marking operation refers to marking the second object included in the sample image; The first training sample set is used to train a neural network to obtain the first image segmentation model; and the second training sample set is used to train the neural network to obtain the second image segmentation model.

3. The method for distinguishing objects according to claim 1, characterized in that: Segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image includes: Acquire the coordinates of the first object in the first segmented image; Based on the coordinates of the first object in the first segmented image, the first object is marked in the second segmented image, and the marked second segmented image is used as the third segmented image.

4. The method for distinguishing objects according to claim 1, characterized in that: Segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image includes: Acquire the coordinates of the second object in the second segmented image; Based on the coordinates of the second object in the second segmented image, the second object is marked in the first segmented image, and the marked first segmented image is used as the third segmented image.

5. The method for distinguishing objects according to claim 1, characterized in that: Segmenting the first object and the second object based on the coordinates of the first object in the first segmented image; and / or the coordinates of the second object in the second segmented image, thereby obtaining a third segmented image includes: Create a reference image; Acquire the coordinates of the first object in the first segmented image; Acquire the coordinates of the second object in the second segmented image; Based on the coordinates of the first object in the first segmented image and the coordinates of the second object in the second segmented image, the first object and the second object are marked in the reference image, and the marked reference image is used as the third segmented image.

6. The method for distinguishing objects according to claim 5, characterized in that: The size of the reference image is the same as that of the test image, and the RGB values ​​of each pixel of the reference image are the same.

7. The method for distinguishing objects according to claim 6, characterized in that: The marking the first object and the second object in the reference image comprises: Adjusting the RGB value of a pixel corresponding to a first target coordinate in the reference image to a first preset value, wherein the first target coordinate refers to a coordinate in the reference image that is the same as the coordinate of the first object in the first segmented image; and The RGB value of the pixel corresponding to the second target coordinates in the reference image is adjusted to a second preset value, wherein the second target coordinates refer to coordinates in the reference image that are the same as the coordinates of the second object in the second segmented image.

8. A computer device, characterized in that: The computer device includes a memory and at least one processor, wherein the memory stores at least one instruction, and when the at least one instruction is executed by the at least one processor, the method for distinguishing objects according to any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for distinguishing objects according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Image processing method and device and storage medium

    CN108921782A

  • Image processing method and device, server and storage medium

    CN109934812A