Optimizing "nested" variables with a genetic algorithm
이전 댓글 표시
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개)
카테고리
도움말 센터 및 File Exchange에서 Choose a Solver에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!