Method, device and electronic equipment for processing position information of binocular vision
By improving the genetic algorithm to optimize the binocular vision position information processing and using crossover and mutation probability adjustment, the problem of large errors between the position information collected and the true value in binocular vision video monitoring in underground coal mines is solved, and the accuracy of position information is improved.
Patent Information
- Application Number
- CN202311095100.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-08-28
AI Technical Summary
In the existing binocular vision technology for underground video surveillance in coal mines, there is a large error between the collected value of the position information of the object to be captured and the actual value.
An improved genetic algorithm (IGA) combined with crossover and mutation probability adjustment is adopted. By obtaining multiple initial position information and using the current number of iterations to calculate the crossover and mutation probabilities, the position information processing method is optimized, including the dynamic adjustment of crossover and mutation probabilities.
The accuracy of the position information is improved, making the final position information closer to the true value and optimizing the error between the collected value and the true value.
Smart Images

Figure CN117197236B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mine visual processing, in particular to a binocular vision position information processing method and device, a computer readable storage medium and an electronic device. BACKGROUND
[0002] Binocular vision is an important form of machine vision, which uses imaging devices to obtain two images of the measured object from different positions, and obtains the three-dimensional geometric information of the object by calculating the positional deviation between the corresponding points of the images. In the field of coal mine video monitoring, binocular vision technology is needed, and the precision of binocular vision technology will directly affect the final result.
[0003] Binocular vision measurement is based on the principle of parallax of the human eye, which simulates the human eye to obtain the three-dimensional information of the object. Two cameras shoot the object from different angles to restore the three-dimensional information of the object through the principle of parallax.
[0004] The error between the collection value and the true value of the position information of the object to be captured in the prior art is large, and there is an urgent need for a binocular vision position information processing method. SUMMARY
[0005] The main purpose of the present application is to provide a binocular vision position information processing method, device, computer readable storage medium and electronic device to at least solve the problem of large error between the collection value and the true value of the position information of the object to be captured in the prior art.
[0006] In order to achieve the above purpose, according to one aspect of the present application, a binocular vision position information processing method is provided, which comprises: obtaining a plurality of initial position information, the initial position information being the collection value of the position information of the object to be captured collected by the camera; determining a plurality of cross probabilities according to the current iteration number and all initial position information, each initial position information corresponding to a plurality of cross probabilities, the cross probability being the probability of exchanging position information between one of all initial position information and other initial position information, the current iteration number being the iteration number at the current time; exchanging each initial position information with the initial position information corresponding to the maximum value of all cross probabilities to obtain a plurality of exchanged position information, and determining a plurality of mutation probabilities according to the current iteration number and all exchanged position information, the exchanged position information and the mutation probability corresponding one by one, the mutation probability being the probability of adjusting one of all exchanged position information; in the case that the mutation probability is greater than a mutation probability threshold, adjusting the exchanged position information corresponding to the mutation probability to obtain a mutated position information.
[0007] Optionally, multiple crossover probabilities are determined based on the current number of iterations and all the initial position information, including: obtaining multiple first error values based on all the initial position information and the true position information, the first error values corresponding one-to-one to the initial position information, the first error value being the difference between the initial position information and the true position information; determining multiple first fitnesses based on all the first error values, the first fitnesses corresponding one-to-one to the first error values; determining multiple crossover probabilities based on all the first fitnesses and the current number of iterations.
[0008] Optionally, determining a plurality of first fitnesses according to all the first error values includes:
[0009] according to Determine a plurality of first fitnesses, wherein E(i) is the first error value of the i-th initial position information, and F(i) is the first fitness of the i-th initial position information.
[0010] Optionally, determining a plurality of crossover probabilities according to all the first fitnesses and the current number of iterations includes:
[0011] according to
[0012] Determine a plurality of crossover probabilities, where P1 is the crossover probability, P 1max is the maximum set value of the crossover probability, P 1min is the minimum setting value of the crossover probability, n is the current number of iterations, n max is the maximum number of iterations, F(i) is the first fitness of the i-th initial position information, F 1mean is the average value of all the first fitnesses.
[0013] Optionally, multiple mutation probabilities are determined based on the current number of iterations and all the exchanged position information, including: obtaining multiple second error values based on all the exchanged position information and the true position information, the second error values corresponding one-to-one to the exchanged position information, and the second error value being the difference between the exchanged position information and the true position information; determining multiple second fitnesses based on all the second error values, the second fitnesses corresponding one-to-one to the second error values; determining multiple mutation probabilities based on the current number of iterations and all the second fitnesses.
[0014] Optionally, determining a plurality of mutation probabilities according to the current number of iterations and all the second fitnesses includes:
[0015] according to
[0016] , determine multiple mutation probabilities, where P2 is the mutation probability, P 2max is the maximum set value of mutation probability, P 2min is the minimum set value of the mutation probability, n is the current number of iterations, n max is the maximum number of iterations, F2(i) is the second fitness of the i-th exchange position information, F 2mean is the average value of all the second fitnesses.
[0017] Optionally, when the mutation probability is greater than the mutation probability threshold, the exchange position information corresponding to the mutation probability is adjusted to obtain the mutation position information. The method further includes: obtaining multiple third error values based on all the mutation position information and the true position information, the third error values corresponding one-to-one to the mutation position information, and the third error value being the difference between the mutation position information and the true position information; determining multiple third fitnesses based on all the third error values, the third fitnesses corresponding one-to-one to the third error values; and determining the mutation position information corresponding to the maximum value among all the third fitnesses.
[0018] According to another aspect of the present application, a device for processing binocular vision position information is provided, the device comprising:
[0019] An acquiring unit, configured to acquire a plurality of initial position information, wherein the initial position information is a collection value of position information of an object to be captured collected by a camera;
[0020] A first determining unit is configured to determine a plurality of crossover probabilities based on a current number of iterations and all initial position information, wherein each initial position information corresponds to a plurality of crossover probabilities, the crossover probability being a probability that one of the initial position information exchanges position information with another of the initial position information, and the current number of iterations being the number of iterations at a current moment;
[0021] a first processing unit, configured to exchange each piece of the initial position information with the initial position information corresponding to the maximum value among all the crossover probabilities to obtain a plurality of exchanged position information, and determine a plurality of mutation probabilities based on the current number of iterations and all the exchanged position information, wherein the exchanged position information corresponds to the mutation probabilities in a one-to-one manner, and the mutation probability is a probability of adjusting one of all the exchanged position information;
[0022] The second processing unit is configured to adjust the exchange position information corresponding to the mutation probability to obtain mutation position information when the mutation probability is greater than a mutation probability threshold.
[0023] According to another aspect of the present application, a computer-readable storage medium is provided, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for processing binocular vision position information.
[0024] According to another aspect of the present application, an electronic device is provided, which includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for processing binocular vision position information to execute any one of the described methods.
[0025] By applying the technical solution of the present application, by adding the current number of iterations into consideration of crossover and mutation, and then performing crossover and mutation on the position information, the final position information is made closer to the true value, thereby achieving the purpose of optimization, and thus solving the problem of large error between the collected value and the true value of the position information of the captured object in the existing solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0027] Figure 1 A schematic flow chart of a method for processing binocular vision position information according to an embodiment of the present application is shown;
[0028] Figure 2 A flow chart showing another method for processing binocular vision position information is shown;
[0029] Figure 3 The figure shows a structural block diagram of a binocular vision position information processing device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] As introduced in the background technology, binocular vision measurement is based on the parallax principle of the human eye, mimicking the human eye to obtain three-dimensional information about an object. Two cameras capture the object from different angles, and the object's three-dimensional information is restored based on the parallax principle. Existing solutions have a large error between the collected value and the true value of the position information of the captured object. There is an urgent need for a method for processing binocular vision position information. To address this issue, embodiments of the present application provide a method, apparatus, computer-readable storage medium, and electronic device for processing binocular vision position information.
[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0035] In an embodiment of the present application, a method for processing binocular vision position information is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Figure 1 FIG. 1 is a flow chart of a method for processing binocular vision position information according to an embodiment of the present application. Figure 1 As shown, the method includes the following steps:
[0037] Step S101, obtaining a plurality of initial position information, the initial position information being a collection value of position information of a to-be-captured object collected by a camera;
[0038] Firstly, the relationship from pixel coordinates to world coordinates can be determined according to the relationship between coordinate systems, then the camera internal and external parameters are solved by Zhang's calibration method, and after the pixel coordinates of the points in the pictures taken by the left and right cameras are obtained, the initial position information is solved by the least square method. When the camera calibration is completed, the camera cannot be moved again, and different angle photos need to be taken.
[0039] Step S202, determining a plurality of cross probabilities according to the current iteration number and all initial position information, each of the initial position information corresponding to a plurality of cross probabilities, the cross probability being a probability of exchanging position information between one of all the initial position information and other initial position information, and the current iteration number being an iteration number at the current time;
[0040] Specifically, the current iteration number is taken into account in the calculation of the cross probability, which can improve the accuracy of the cross probability calculation. Each initial position information needs to obtain a cross probability with all other initial position information, and then the initial position information corresponding to the maximum cross probability is selected. At least one of the x-axis, y-axis and z-axis coordinates of the two initial position information is exchanged, thereby improving the accuracy of the exchanged position information.
[0041] In an embodiment of the present application, the plurality of cross probabilities are determined according to the current iteration number and all initial position information, comprising:
[0042] According to all the initial position information and the true position information, a plurality of first error values are obtained, the first error values corresponding to the initial position information one by one, and the first error value being a difference between the initial position information and the true position information;
[0043] Each initial position information needs to obtain a cross probability with all other initial position information;
[0044] According to all the first error values, a plurality of first fitnesses are determined, the first fitnesses corresponding to the first error values one by one;
[0045] Specifically, the first fitness is the reciprocal of the first error value,
[0046] According to determining a plurality of first fitnesses, wherein E(i) is the first error value of the i-th initial position information, and F(i) is the first fitness of the i-th initial position information.
[0047] According to all the first fitness values and the current number of iterations, a plurality of crossover probabilities are determined.
[0048] Specifically, the fitness of the population in the first few generations is low, and a large crossover probability needs to be maintained. This can ensure that the new individuals produced have sufficient diversity, which is conducive to the generation of new genes with greater fitness. As the number of iterations increases, the individual fitness becomes greater and greater, which requires reducing the crossover probability, which is more conducive to allowing excellent genes to be inherited to the next generation.
[0049] In one embodiment of the present application, a plurality of crossover probabilities are determined based on all of the first fitness values and the current number of iterations, including:
[0050] according to Determine multiple of the above crossover probabilities,
[0051] Among them, P1 is the above crossover probability, P 1max is the maximum set value of the crossover probability, P 1min is the minimum setting value of the crossover probability, n is the current number of iterations, n max is the maximum number of iterations, F(i) is the first fitness of the i-th initial position information, F 1mean is the average value of all the above first fitnesses.
[0052] Specifically, the key to determining whether this iteration is mainly crossover or main inheritance depends on individual fitness, so for classification discussion, if the current fitness is less than the average fitness, it means that there are no sufficiently good individuals in the current population, so the crossover probability needs to be appropriately increased; otherwise, the crossover probability needs to be reduced.
[0053] Step S103: Each of the initial position information is exchanged with the initial position information corresponding to the maximum value among all the crossover probabilities to obtain a plurality of exchanged position information. A plurality of mutation probabilities are determined based on the current number of iterations and all the exchanged position information. The exchanged position information corresponds to the mutation probabilities one-to-one, and the mutation probability is the probability of adjusting one of the exchanged position information.
[0054] In step S103, multiple mutation probabilities are determined based on the current number of iterations and all the exchange position information, including:
[0055] Obtaining a plurality of second error values based on all of the exchanged position information and the true position information, wherein the second error values correspond one-to-one to the exchanged position information and the second error values are differences between the exchanged position information and the true position information;
[0056] Specifically, according to Determine a second error value,
[0057] E is the second error value, x y 、y y 、z y To exchange the x-axis, y-axis, and z-axis values of the position information, x s 、y s 、z s The x-axis, y-axis, and z-axis values of the actual position information.
[0058] Determine a plurality of second fitnesses according to all the second error values, wherein the second fitnesses correspond one to one to the second error values;
[0059] Specifically, the calculation process of the second fitness is the same as that of the first fitness, so we will not elaborate on it here.
[0060] The plurality of mutation probabilities are determined according to the current number of iterations and all the second fitness values.
[0061] according to Determine multiple of the above mutation probabilities,
[0062] Among them, P2 is the above mutation probability, P 2max is the maximum set value of mutation probability, P 2min is the minimum set value of the mutation probability, n is the current number of iterations, n max is the maximum number of iterations, F2(i) is the second fitness of the i-th exchange position information, F 2mean is the average value of all the above second fitness.
[0063] Specifically, we discuss each case. When the individual fitness is less than the average, it is necessary to increase the probability of mutation and produce enough gene mutations. More gene mutations will lead to a larger variance in the individual fitness of the next generation, that is, the fitness value will be more discrete. Then, some individuals with high fitness are selected through sorting to form a new population, ensuring that the average fitness of the individuals in the new population is higher than that of the old population.
[0064] Step S104: When the mutation probability is greater than the mutation probability threshold, the exchange position information corresponding to the mutation probability is adjusted to obtain mutation position information.
[0065] Specifically, at least one of the x-axis, y-axis, and z-axis coordinates of the exchange position information is increased or decreased by a preset value, for example, the x-axis and y-axis coordinates of the exchange position information are respectively increased by 1, thereby adjusting the exchange position information and helping to improve the accuracy of the variant position information.
[0066] In the above embodiment, by adding the current number of iterations into the consideration of crossover and mutation, and then performing crossover and mutation on the position information, the final position information is made closer to the true value, thereby achieving the purpose of optimization, and thus solving the problem of large error between the collected value and the true value of the position information of the captured object in the existing solution.
[0067] IGA (Improved Genetic Algorithm) is used to enhance the convergence ability of BP network and obtain stronger global optimization effect, significantly improving the processing efficiency and accuracy of BP network.
[0068] In one embodiment of the present application, when the above-mentioned mutation probability is greater than the mutation probability threshold, the above-mentioned exchange position information corresponding to the above-mentioned mutation probability is adjusted to obtain the mutation position information, and the above-mentioned method also includes: obtaining multiple third error values based on all the above-mentioned mutation position information and the true position information, the above-mentioned third error values correspond one-to-one to the above-mentioned mutation position information, and the above-mentioned third error value is the difference between the above-mentioned mutation position information and the above-mentioned true position information; determining multiple third fitnesses based on all the above-mentioned third error values, the above-mentioned third fitnesses correspond one-to-one to the above-mentioned third error values; and determining the above-mentioned mutation position information corresponding to the maximum value among all the above-mentioned third fitnesses.
[0069] Specifically, after the crossover and mutation, the location information with the highest fitness needs to be selected as the final location information to be displayed to the staff, so it is necessary to reuse To calculate the third fitness, the calculation process is the same as the first fitness, so I will not go into details here.
[0070] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the binocular vision position information processing method of the present application will be described in detail below with reference to specific embodiments.
[0071] This embodiment relates to a specific method for processing binocular vision position information, such as Figure 2 As shown, the following steps are included:
[0072] Step S1: According to and P new =b(1-q0)β-1,
[0073] Determine which individuals in the current generation will be selected to enter the next generation. α represents the number of samples in the population; q0 is the probability of selecting the best individual; b is the result of the standardized calculation of q0; β is the position parameter of the i-th individual determined by the population sorting, P new is the probability of each individual in the current population being selected to enter the next generation;
[0074] Wherein, first, the individual is sorted according to fitness, and then each individual is given a probability, which is a function of the serial number, the earlier the sorting, the greater the probability;
[0075] Step S2: population initialization and coding is the process of mapping coordinate points into individuals, the format of the coordinate point is (X, Y, Z), in order to facilitate the calculation of crossover and mutation, this paper uses the method of mapping into binary number; If the resolution of the camera is 1024x1024, 210=2014, then using 10-bit binary number can complete a coordinate axis coding, three coordinate axes are coded by 30-bit binary number; If the resolution of the camera is higher, then more bits of binary number should be used for coding, if the resolution of the camera is N, then the number of binary digits required for coding should be a positive integer greater than (log2N), PB network structure, weight and threshold value are determined by the algorithm;
[0076] Step S3: calculate the fitness value (corresponding to the calculation of the first fitness);
[0077] Step S4: chromosome replication and improved selection operator;
[0078] Wherein, chromosome replication: the process of producing offspring from parent individuals, and not the selected individuals after calculation are directly taken to become offspring, but the selected parents are copied, and the copy is the offspring, the process of copying is chromosome replication.
[0079] Improved selection operator: sorting before selection, the higher the fitness of the individual, the greater the probability of selection, that is, improvement, the probability of each individual being selected in the unimproved algorithm is the same.
[0080] Step S5: improve the adaptive crossover probability, specifically, according to all the above initial position information and the true position information, a plurality of first error values are obtained, the above first error values correspond to the above initial position information one by one, the above first error values are the difference between the above initial position information and the above true position information;
[0081] Each initial position information needs to obtain a crossover probability with all other initial position information respectively;
[0082] According to all the above first error values, a plurality of first fitness values are determined, the above first fitness values correspond to the above first error values one by one;
[0083] According to a plurality of first fitness values are determined, wherein E(i) is the first error value of the i-th initial position information, and F(i) is the first fitness value of the i-th initial position information;
[0084] Determining a plurality of the crossover probabilities according to all the first fitness values and the current number of iterations;
[0085] Step S6: Improving the adaptive mutation probability. Specifically, each of the initial position information is exchanged with the initial position information corresponding to the maximum value among all the crossover probabilities to obtain a plurality of exchanged position information. Based on the current number of iterations and all the exchanged position information, a plurality of mutation probabilities are determined. The exchanged position information corresponds to the mutation probabilities one-to-one, and the mutation probability is the probability of adjusting one of all the exchanged position information. When the mutation probability is greater than a mutation probability threshold, the exchanged position information corresponding to the mutation probability is adjusted to obtain the mutated position information.
[0086] Step S7: Creating a new population (collecting the replicas generated in the above steps into a set, which is an instance of the new population, and calculating the average fitness and individual fitness of the instance), and calculating the fitness values of the individuals in the new population. Specifically, based on all of the variant position information and the true position information, a plurality of third error values are obtained, each of which corresponds one-to-one to the variant position information and is the difference between the variant position information and the true position information; and based on all of the third error values, a plurality of third fitness values are determined, each of which corresponds one-to-one to the third error values.
[0087] Step S8: Update the global optimal individual, g max It is a fitness value set artificially before the algorithm starts calculating. If the fitness of individuals in the population is less than g max , it means that the optimal solution has not been found, then the population is brought into the algorithm and a new round of iterative calculation is performed; if the fitness of the individual with the largest fitness in the population is greater than g max , then this individual is the global optimal individual;
[0088] Step S9: saving the best individual, specifically, determining the mutation position information corresponding to the maximum value among all the third fitness values;
[0089] Step S10: decoding (the process of mapping binary numbers into coordinates) to obtain the optimal threshold and weight;
[0090] Step S11: Network training. When the fitness is less than ε (i.e., the fitness threshold), network testing is performed and the test error is output.
[0091] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0092] The embodiment of the present application also provides a device for processing the position information of binocular vision. It should be noted that the device for processing the position information of binocular vision in the embodiment of the present application can be used to execute the method for processing the position information of binocular vision provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions thereof will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0093] The following introduces the binocular vision position information processing device provided in the embodiment of the present application.
[0094] Figure 3 This is a structural block diagram of a binocular vision position information processing device provided according to an embodiment of the present application. Figure 3 As shown, the device includes:
[0095] An acquiring unit 31 is configured to acquire a plurality of initial position information, wherein the initial position information is a collection value of the position information of the object to be captured collected by the camera;
[0096] A first determining unit 32 is configured to determine a plurality of crossover probabilities based on a current iteration number and all initial position information, wherein each initial position information corresponds to a plurality of crossover probabilities, and each crossover probability is a probability that one of the initial position information exchanges position information with another of the initial position information. The current iteration number is the number of iterations at the current moment.
[0097] The first processing unit 33 is configured to exchange each of the initial position information with the initial position information corresponding to the maximum value among all the crossover probabilities to obtain a plurality of exchanged position information, and determine a plurality of mutation probabilities based on the current iteration number and all the exchanged position information, wherein the exchanged position information corresponds to the mutation probabilities one by one, and the mutation probability is the probability of adjusting one of the exchanged position information.
[0098] The second processing unit 34 is configured to adjust the exchange position information corresponding to the mutation probability to obtain mutation position information when the mutation probability is greater than a mutation probability threshold.
[0099] In the above device, by adding the current number of iterations into the consideration of crossover and mutation, and then performing crossover and mutation on the position information, the final position information is made closer to the true value, thereby achieving the purpose of optimization, and thus solving the problem of large error between the collected value and the true value of the position information of the captured object in the existing scheme.
[0100] In one embodiment of the present application, the first determination unit includes a first processing module, a second processing module and a third processing module. The first processing module is used to obtain multiple first error values based on all the above-mentioned initial position information and the actual position information. The above-mentioned first error values correspond one-to-one to the above-mentioned initial position information, and the above-mentioned first error value is the difference between the above-mentioned initial position information and the above-mentioned actual position information; the second processing module is used to determine multiple first fitnesses based on all the above-mentioned first error values, and the above-mentioned first fitnesses correspond one-to-one to the above-mentioned first error values; the third processing module is used to determine multiple crossover probabilities based on all the above-mentioned first fitnesses and the above-mentioned current number of iterations.
[0101] In one embodiment of the present application, the second processing module includes a first processing submodule,
[0102] The first processing submodule is used to A plurality of first fitnesses are determined, wherein E(i) is the first error value of the i-th initial position information, and F(i) is the first fitness of the i-th initial position information.
[0103] In one embodiment of the present application, the third processing module includes a second processing submodule,
[0104] The second processing submodule is used to
[0105] Determine multiple crossover probabilities, where P1 is the crossover probability, P 1max is the maximum set value of the crossover probability, P 1min is the minimum setting value of the crossover probability, n is the current number of iterations, n max is the maximum number of iterations, F(i) is the first fitness of the i-th initial position information, F 1mean is the average value of all the above first fitnesses.
[0106] In an embodiment of the present application, the first processing unit comprises a fourth processing module, a fifth processing module and a sixth processing module, the fourth processing module is configured to obtain a plurality of second error values according to all the above-mentioned exchanged position information and the real position information, the second error values correspond to the exchanged position information one by one, and the second error values are the differences between the exchanged position information and the real position information; the fifth processing module is configured to determine a plurality of second fitness according to all the above-mentioned second error values, the second fitness correspond to the second error values one by one; and the sixth processing module is configured to determine a plurality of the mutation probability according to the current iteration number and all the above-mentioned second fitness.
[0107] In an embodiment of the present application, the sixth processing module comprises a third processing submodule,
[0108] The third processing submodule is configured to determine the mutation probability according to
[0109] determine a plurality of the mutation probability, wherein P2 is the mutation probability, P 2max is a maximum set value of the mutation probability, P 2min is a minimum set value of the mutation probability, n is the current iteration number, n max is a maximum value of the iteration number, F2(i) is the second fitness of the i-th exchanged position information, and F 2mean is the average value of all the second fitness.
[0110] In an embodiment of the present application, the device further comprises a second determining unit, a third determining unit and a fourth determining unit, in the case that the mutation probability is greater than the mutation probability threshold, after the exchanged position information corresponding to the mutation probability is adjusted to obtain the mutated position information, the second determining unit is configured to obtain a plurality of third error values according to all the above-mentioned mutated position information and the real position information, the third error values correspond to the mutated position information one by one, and the third error values are the differences between the mutated position information and the real position information; the third determining unit is configured to determine a plurality of third fitness according to all the above-mentioned third error values, the third fitness correspond to the third error values one by one; and the fourth determining unit is configured to determine the mutated position information corresponding to the maximum value of all the above-mentioned third fitness.
[0111] The processing device of the binocular vision position information comprises a processor and a memory, the above-mentioned acquisition unit, the first determining unit, the first processing unit and the second processing unit are all stored in the memory as program units, and the corresponding functions are realized by the processor executing the above-mentioned program units stored in the memory. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination.
[0112] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem that the existing solution has a large error between the collected value and the actual value of the position information of the captured object.
[0113] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0114] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the binocular vision position information processing method.
[0115] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for processing binocular vision position information is executed when the program is run.
[0116] An embodiment of the present invention provides a device comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the device performs at least the following steps: obtaining multiple initial position information, wherein the initial position information is the acquired value of the position information of the object to be captured, collected by the camera; determining multiple crossover probabilities based on the current iteration number and all the initial position information, wherein each of the initial position information corresponds to the multiple crossover probabilities, wherein the crossover probability is the probability that one of the initial position information among all the initial position information will exchange position information with another of the initial position information, wherein the current iteration number is the iteration number at the current moment; exchanging each of the initial position information with the initial position information corresponding to the maximum value among all the crossover probabilities, thereby obtaining multiple exchanged position information; and determining multiple mutation probabilities based on the current iteration number and all the exchanged position information, wherein the exchanged position information corresponds to the mutation probabilities one-to-one, wherein the mutation probability is the probability of adjusting one of the exchanged position information among all the exchanged position information; and when the mutation probability is greater than a mutation probability threshold, adjusting the exchanged position information corresponding to the mutation probability to obtain the mutation position information. The device herein may be a server, a PC, a PAD, a mobile phone, or the like.
[0117] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialized program having at least the following method steps: obtaining a plurality of initial position information, the above-mentioned initial position information being the collected value of the position information of the object to be captured collected by the camera; determining a plurality of crossover probabilities based on the current number of iterations and all the initial position information, each of the above-mentioned initial position information corresponding to a plurality of the above-mentioned crossover probabilities respectively, the above-mentioned crossover probability being the probability that one of all the above-mentioned initial position information exchanges position information with the other above-mentioned initial position information, and the above-mentioned current number of iterations being the number of iterations at the current moment; exchanging each of the above-mentioned initial position information with the above-mentioned initial position information corresponding to the maximum value among all the above-mentioned crossover probabilities to obtain a plurality of exchanged position information, and determining a plurality of mutation probabilities based on the above-mentioned current number of iterations and all the above-mentioned exchanged position information, the above-mentioned exchanged position information corresponding to the above-mentioned mutation probability one-to-one, the above-mentioned mutation probability being the probability of adjusting one of all the above-mentioned exchanged position information; when the above-mentioned mutation probability is greater than the mutation probability threshold, adjusting the above-mentioned exchanged position information corresponding to the above-mentioned mutation probability to obtain mutation position information.
[0118] The present application also provides an electronic device, which includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for processing binocular vision position information for executing any of the above-mentioned binocular vision positions. By adding the current number of iterations to the consideration of crossover and mutation, and then performing crossover and mutation on the position information, the final position information is made closer to the true value, thereby achieving the purpose of optimization, thereby solving the problem that the existing scheme has a large error between the collected value and the true value of the position information of the captured object.
[0119] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0120] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0121] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 steps in the process. 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.
[0122] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0124] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0125] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0126] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0127] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0128] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0129] 1) The binocular vision position information processing method of the present application adds the current number of iterations to the consideration of crossover and variation, and then crosses and mutates the position information, so that the final position information is closer to the true value, achieving the purpose of optimization, and thus solving the problem of large error between the collected value and the true value of the position information of the captured object in the existing scheme.
[0130] 2) The binocular vision position information processing device of the present application takes into account the crossover and variation of the current number of iterations, and then crosses and varies the position information, so that the final position information is closer to the true value, thereby achieving the purpose of optimization, and thus solving the problem of large errors between the collected value and the true value of the position information of the captured object in the existing scheme.
[0131] The above descriptions are only the preferred embodiments of the present application, and are not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for processing binocular vision position information, characterized in that: include: Acquire multiple initial position information, where the initial position information is a collection value of position information of the object to be captured collected by the camera; Determine, based on the current number of iterations and all initial position information, a plurality of crossover probabilities, each of the initial position information corresponding to the plurality of crossover probabilities, the crossover probability being a probability that one of the initial position information exchanges position information with the other initial position information, and the current number of iterations being the number of iterations at the current moment; Exchanging each of the initial position information with the initial position information corresponding to the maximum value among all the crossover probabilities to obtain a plurality of exchanged position information, and determining a plurality of mutation probabilities based on the current number of iterations and all the exchanged position information, wherein the exchanged position information corresponds to the mutation probabilities in a one-to-one manner, and the mutation probability is the probability of adjusting one of all the exchanged position information; When the mutation probability is greater than a mutation probability threshold, adjusting the exchange position information corresponding to the mutation probability to obtain mutation position information; Determining a plurality of crossover probabilities based on the current number of iterations and all initial position information, including: obtaining a plurality of first error values based on all the initial position information and the true position information, the first error values corresponding one-to-one with the initial position information, the first error value being a difference between the initial position information and the true position information; determining a plurality of first fitnesses based on all the first error values, the first fitnesses corresponding one-to-one with the first error values; and determining the plurality of crossover probabilities based on all the first fitnesses and the current number of iterations; Determining a plurality of mutation probabilities based on the current number of iterations and all of the exchanged position information, including: obtaining a plurality of second error values based on all of the exchanged position information and the true position information, wherein the second error values correspond one-to-one with the exchanged position information, and the second error value is a difference between the exchanged position information and the true position information; determining a plurality of second fitnesses based on all of the second error values, wherein the second fitnesses correspond one-to-one with the second error values; and determining the plurality of mutation probabilities based on the current number of iterations and all of the second fitnesses; When the mutation probability is greater than the mutation probability threshold, the exchange position information corresponding to the mutation probability is adjusted to obtain the mutation position information. The method further includes: obtaining a plurality of third error values based on all the mutation position information and the true position information, the third error values corresponding one-to-one to the mutation position information, and the third error value being the difference between the mutation position information and the true position information; determining a plurality of third fitnesses based on all the third error values, the third fitnesses corresponding one-to-one to the third error values; and determining the mutation position information corresponding to the maximum value among all the third fitnesses.
2. The method according to claim 1, characterized in that Determining a plurality of first fitnesses according to all of the first error values includes: according to , determine multiple first fitnesses, where, For the the first error value of the initial position information, For the The first fitness of the initial position information.
3. The method according to claim 1, characterized in that Determining a plurality of crossover probabilities according to all of the first fitnesses and the current number of iterations includes: according to , determine a plurality of said crossover probabilities, in, is the crossover probability, is the maximum setting value of the crossover probability, is the minimum setting value of the crossover probability, is the current iteration number, is the maximum number of iterations, For the the first fitness of the initial position information, is the average value of all the first fitnesses.
4. The method according to claim 1, wherein Determining a plurality of mutation probabilities according to the current number of iterations and all the second fitnesses includes: according to , determine a plurality of said mutation probabilities, in, is the mutation probability, is the maximum set value of mutation probability, is the minimum set value of mutation probability, is the current iteration number, is the maximum number of iterations, For the a second fitness of the exchanged position information, is the average value of all the second fitnesses.
5. A binocular vision position information processing device, characterized in that: include: An acquiring unit, configured to acquire a plurality of initial position information, wherein the initial position information is a collection value of position information of an object to be captured collected by a camera; A first determining unit is configured to determine a plurality of crossover probabilities based on a current number of iterations and all initial position information, wherein each initial position information corresponds to a plurality of crossover probabilities, the crossover probability being a probability that one of the initial position information exchanges position information with another of the initial position information, and the current number of iterations being the number of iterations at a current moment; a first processing unit, configured to exchange each piece of the initial position information with the initial position information corresponding to the maximum value among all the crossover probabilities to obtain a plurality of exchanged position information, and determine a plurality of mutation probabilities based on the current number of iterations and all the exchanged position information, wherein the exchanged position information corresponds to the mutation probabilities in a one-to-one manner, and the mutation probability is a probability of adjusting one of all the exchanged position information; a second processing unit, configured to adjust the exchange position information corresponding to the mutation probability to obtain mutation position information when the mutation probability is greater than a mutation probability threshold; The first determining unit includes a first processing module, a second processing module, and a third processing module. The first processing module is configured to obtain a plurality of first error values based on all the initial position information and the true position information. The first error values correspond to the initial position information one-to-one, and the first error value is a difference between the initial position information and the true position information. The second processing module is configured to determine a plurality of first fitnesses according to all the first error values, wherein the first fitnesses correspond to the first error values in a one-to-one manner; the third processing module is configured to determine a plurality of crossover probabilities according to all the first fitnesses and the current number of iterations; The first processing unit includes a fourth processing module, a fifth processing module, and a sixth processing module, the fourth processing module being configured to obtain a plurality of second error values based on all of the exchanged position information and the true position information, the second error values corresponding one-to-one to the exchanged position information, and the second error value being a difference between the exchanged position information and the true position information; The fifth processing module is configured to determine a plurality of second fitnesses based on all the second error values, where the second fitnesses correspond one-to-one to the second error values; the sixth processing module is configured to determine a plurality of mutation probabilities based on the current number of iterations and all the second fitnesses; The apparatus further includes a second determining unit, a third determining unit, and a fourth determining unit. When the mutation probability is greater than a mutation probability threshold, the exchange position information corresponding to the mutation probability is adjusted. After obtaining the variant position information, the second determining unit is configured to obtain a plurality of third error values based on all of the variant position information and the true position information. The third error values correspond one-to-one to the variant position information and are differences between the variant position information and the true position information. The third determining unit is used to determine multiple third fitnesses based on all the third error values, and the third fitnesses correspond to the third error values one by one; the fourth determining unit is used to determine the variation position information corresponding to the maximum value among all the third fitnesses.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute the binocular vision position information processing method according to any one of claims 1 to 4.
7. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for processing binocular vision position information according to any one of claims 1 to 4.
Citation Information
Patent Citations
Imaging satellite task planning method
CN107239860A
Bayesian network structure adaptive learning method and device, storage device and terminal device
CN107480768A