Reconfiguration system, which increases the energy efficiency in photovoltaic (PV) systems, is a critical stage in terms of energy efficiency. In this study, a moving shadow analysis and a novel optimization based on the reconfiguration method are proposed. The proposed approach builds up a new configuration by incorporating the radiation values into the PV system. To this end, the system is divided into two parts: adaptive and fixed, with the help of switching matrices. Image processing is employed in the study to acquire shadows and their information. The clonal selection method, which is an artificial immune algorithm, is preferred as the optimization process. The method is tested on a real PV system of a matrix size of 3x4. Both the series-parallel (SP) and total-cross-tied (TCT) connections are used in the tests. Shadows cast on the PV system are monitored incessantly by a camera and a reconfiguration is applied according to a predefined time threshold. The tests, performed in real time, show that the proposed system is accurate and efficient. The proposed reconfiguration method provides 10-20% of the average energy extraction for the S&P and TCT configuration layout.