Direct aperture optimization (DAO) attempts to incorporate machine constraints in the inverse optimization to eliminate the post-processing steps in fluence map optimization (FMO) that degrade plan quality. Current commercial DAO methods utilize a stochastic or greedy approach to search a small aperture solution space. In this study, we propose a novel deterministic direct aperture optimization that integrates the segmentation of fluence map in the optimization problem using the multiphase piecewise constant Mumford-Shah formulation. The Mumford-Shah based direct aperture optimization problem was formulated to include an L2-norm dose fidelity term to penalize differences between the projected dose and the prescribed dose, an anisotropic total variation term to promote piecewise continuity in the fluence maps, and the multiphase piecewise constant Mumford-Shah function to partition the fluence into pairwise discrete segments. A proximal-class, first-order primal-dual solver was implemented to solve the large scale optimization problem, and an alternating module strategy was implemented to update fluence and delivery segments. Three patients of varying complexity-one glioblastoma multiforme (GBM) patient, one lung (LNG) patient, and one bilateral head and neck (H&N) patient with 3 PTVs-were selected to test the new DAO method. For each patient, 20 non-coplanar beams were first selected using column generation, followed by the Mumford-Shah based DAO (DAOMS ). For comparison, a popular and successful approach to DAO known as simulated annealing-a stochastic approach-was replicated. The simulated annealing DAO (DAOSA ) plans were then created using the same beam angles and maximum number of segments per beam. PTV coverage, PTV homogeneity D95D5, and OAR sparing were assessed for each plan. In addition, high dose spillage, defined as the 50% isodose volume divided by the tumor volume, as well as conformity, defined as the van't Riet conformation number, were evaluated. DAOMS achieved essentially the same OAR doses compared with the DAOSA plans for the GBM case. The average difference of OAR Dmax and Dmean between the two plans were within 0.05% of the plan prescription dose. The lung case showed slightly improved critical structure sparing using the DAOMS approach, where the average OAR Dmax and Dmean were reduced by 3.67% and 1.08%, respectively, of the prescription dose. The DAOMS plan substantially improved OAR dose sparing for the H&N patient, where the average OAR Dmax and Dmean were reduced by over 10% of the prescription dose. The DAOMS and DAOSA plans were comparable for the GBM and LNG PTV coverage, while the DAOMS plan substantially improved the H&N PTV coverage, increasing D99 by 6.98% of the prescription dose. For the GBM and LNG patients, the DAOMS and DAOSA plans had comparable high dose spillage but slightly worse conformity with the DAOMS approach. For the H&N plan, DAOMS was considerably superior in high dose spillage and conformity to the DAOSA . The deterministic approach is able to solve the DAO problem substantially faster than the simulated annealing approach, with a 9.5- to 40-fold decrease in total solve time, depending on the patient case. A novel deterministic direct aperture optimization formulation was developed and evaluated. It combines fluence map optimization and the multiphase piecewise constant Mumford-Shah segmentation into a unified framework, and the resulting optimization problem can be solved efficiently. Compared to the widely and commercially used simulated annealing DAO approach, it showed comparable dosimetry behavior for simple plans, and substantially improved OAR sparing, PTV coverage, PTV homogeneity, high dose spillage, and conformity for the more complex head and neck plan.