This study presents a new method to determine the location, size and depth of the pores in the material that is based on the asymmetry in the X-ray yield induced by proton micro-beam acquired in samples by a pair of X-ray detectors. Most of the samples have cavities within their structures that may affect the quantitative elemental concentration. Although, there are several methods to measure the porosity that are based on a physical fact. Here, we demonstrate a study that is based on the lack of X-ray absorption induced by proton along the void region. In fact, we have different X-ray absorption along the sample which results in asymmetry X-ray yield in two spectrometers positioned at backward of the probing beam. The presented approach introduces an asymmetry factor of the X-ray intensity in each of the detector to obtain an image asymmetry map. Our calculation was employed on silicon-based devices to estimate the size of the proposed cavity and the localized depth of the hole in composed material in micro-PIXE analysis. It was deduced that the presented approach is sensitive to the depth and the size of the hole in the composed material.