Optimizing "nested" variables with a genetic algorithm
1 view (last 30 days)
Show older comments
Hi there,
I'm trying to optimize the camera positions for a 3D reconstruction. There are 2 cameras available which can be placed anywhere around the object. The camera position is determined by its 3 spherical coordinates.
I am currently running a ga() optimization where the objective function has an input of a 2x3 matrix, determining camera positions. The output is a scalar characterizing the exactness of the 3D reconstruction.
objfun = @(xarray)reconstruction_fun(xarray);
The problem with this approach is that all entries of the matrix are scored as individuals. I would like the algorithm to take 2 vectors as an entry, each describing one camera position. And then optimize the 2 camera positions. The objective function would have to take 2 inputs as variables.
cam1=(radius1, phi1, theta1)
cam2= (..)
objfun = @(cam1, cam2)reconstruction_fun(cam1, cam2);
Is there a better way to achieve the optimization than with all variables thrown into one array?
Thanks, Simon
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!