• No results found

Decomposing the Problem into Subproblems

4.2 Exploring the Space of Camera to ROI Assignments

4.2.5 Decomposing the Problem into Subproblems

In Section 4.2.4, I showed that using proximity to group ROIs reduces the number of ROI combinations nROIcombs. However, all possible combinations of ROI groups are still ex- plored, even if they are far from each other, and impossible to cover even at the widest field of view. Additionally, all possible assignments of cameras to ROI combinations are still ex- plored, even if a camera is very far from the ROI group combination it was assigned to. As I show in Sections 5.4.6 and 5.4.8, such assignments usually result in worse performance as measured by the performance metric. To avoid these under-performing assignments and to speed up computation, a greedy approach based on proximity and other heuristics can be used to assign each ROI group combination to cameras that are close by. Once these greedy as- signments are made, the problem remains to decide which of the cameras assigned to a ROI group combination get further assigned to which ROI group inside each group combination. These local assignmentsubproblems are simply smaller scale versions of the global assign- ment problem.

Let nSubProbs be the total number of subproblems that can be formed using proximity. Let each subproblempcontainnROIspROIs and be covered bynCamspcameras closest to it.

The number of possible combined ROIs, computed as the number of non-empty subsets of the set of ROIs by applying Equation 3.4.4 at the level of each group, is:

nROIcombsp= nROIsp

k=1 nROIsp k =2nROIsp1 (4.2.9)

Under the simplifying assumption that a camera only contributes to the ROIs inside the subproblem it has been assigned to,nROIscan be replaced bynROIspin Equation 3.2.4:

nContribsp=nCamsp·nROIsp·nU nits (4.2.10)

The number of contributions to evaluate inside each subproblem can be computed by ap- plying Equation 3.4.5 at the level of each subproblem:

nCon f igsp=nCapturesnROIcombsp·nCamsp'nCaptures2nROIsp·nCamsp (4.2.11)

The search complexity in terms of contribution computations can be computed by applying the Combined ROI Equation 3.4.6 at the level of each subproblempand summing the results:

SCsubprobs= nSubProbs

p=1

nCapturesnROIcombsp·nCamspnSteps·nCams

p·nROIsp·nU nits

(4.2.12) The dominant term in the Subproblems Equation 4.2.12 is the additive term corresponding to the subproblem with the largest exponent nROIcombsp·nCamsp. This term is minimized

when all subproblems are of the same size: nROIsp =nROIs/nSubProbs and nCamsp =

nCams/nSubProbs. Under the assumption that optimizing the performance metric in each group leads to the overall optimum, the optimization process can be performed independently at the level of each group.

Comparing the Combined ROI Equation 3.4.6 with the Subproblems Equation 4.2.12, the benefits of decomposing the problem into subproblems are apparent: the number of contribu- tion computations decreases, and the optimization process can be run independently for each group, in parallel. However, decomposing the problem into subproblems can lead to a subop- timal solution, because assignment decisions are not made through optimization. The merits of decomposing the problem into subproblems should be judged on whether the risk of not finding the global optimum is offset by the benefit of being able to explore a smaller search space in less time.

The following figures show plots of the search complexity in terms of computed contribu- tions.

For a first example, corresponding to the situation where subproblems are assigned to a constant number of available processors, I chose a constant number of subproblemsnSubProbs=

8. Figure 4.9 shows a plot of the number of computed contributionsSCsubprobs, given by the

Subproblems Equation 4.2.12, for 8 subproblems. I set nROIsp=dnROIs/8e and nCamsp=

dnCams/8e. Note the staircase look fornROIs∈ {8,16}, due to the use of theceil function to

determinenCamspandnROIsp.

5 10 15 20 100 101 102 nROIs log 10 (SC subprobs ) nCams=10 nCams=20 nCams=30

Figure 4.9: Numerical example for optimization using 8 subproblems. Setting values are the same as in Figure 3.2, andnSubProbs=8 subproblems.

As a second example, corresponding to the situation where subproblems are run as threads, I chose to make the number of subproblemsnSubProbsas large as possible, to spread the com- putation in as many threads as possible. IfMCis the minimum number of cameras required for 3D reconstruction, the largest number of subproblems that can be formed while ensuring each subproblem has at leastMCcameras assigned to it isnSubProbs=dnCams/MCe. The cor-

responding values fornROIspandnCamsparenROIsp=dnROIs/nSubProbseandnCamsp=MC.

Figure 4.10 shows a plot of the logarithm of the number of computed contributionsSCsubprobs, given by the Groups Equation 4.2.12, for a varying number of subproblems. I chose the mini- mum number of cameras required for 3D reconstructionMC=2.

5 10 15 20 100 101 102 nROIs log 10 (SC subprobs ) nCams=10 nCams=20 nCams=30

Figure 4.10: Numerical example for optimization using a variable number of subproblems. Setting values are the same as in Figure 3.2, andnSubProbs=dnCams/2esubproblems.

As the number of camerasnCamsincreases, so does the number of subproblemsnSubProbs. The number of ROIs in each subproblem nROIsp decreases, resulting in a smaller overall search complexity. Theceilfunction affects the search complexity in a more complex way, as

nSubProbsis no longer constant.

Comparing Figure 4.9 with Figure 4.10, in the case of a fixed number of subproblems the search complexity increases with the number of cameras, while in the case of a varying number of subproblems increasing the number of cameras allows creating more subproblems and subdividing the work among them, which results in lower search complexity.