Gas–liquid two-phase flow is a typical flow. Its bubble characteristic measurement is of great importance on studying the flow mechanism and guiding the practical fluid mechanical engineering. In this paper, a novel three dimensional (3D) multiphase flow imaging device was designed and optimized to measure the transparent object that has an opaque object in the center of the 3D observed area. Its mathematical model was built and the constraints were defined based on the geometrical relationship and design requirements. Based on the original harmony search (HS) algorithm, a modified harmony search algorithm (MHS-MC) for improving both the performance on the global optima of the multi-modal problems and the convergence performance of the constrained optimization problems was integrated and applied to optimize the arrangement of the single-camera-multi-mirror device. As a case study, the 3D multiphase flow imaging method was applied in the 3D reconstruction of the cavitation bubble cluster inside a water hydraulic valve. The statistics of the Pareto data show the good performance of the MHS-MC algorithm. And the cavitation experimental results testify the effectiveness of the proposed MHS-MC algorithm. The cavitation bubble cluster can be reconstructed with quite high precision.