In this paper, the authors evaluate the porosity of given sand images using image processing technique. An adaptive thresholding technique has been used to calculate this. It has been shown that, the flow and shear characteristics of granular particles such as soils are significantly dependent on the shape of the particles. This is important from a practical viewpoint because a fundamental understanding of granular behavior will lead to an improved understanding of soil stability and influence the design of structural foundations. Furthermore, the calculation of soil stability and, consequently, structural stability is particularly useful during earthquake events. In previous work, the author have demonstrated the applicability of X-ray and optical tomography measurements for characterizing 3-D shapes of natural sands and manufactured granular particles. In this paper, the authors name extended the work to measure the arrangement and the orientation of an assemblage of such particles. A combination of X-ray Computed Tomography (CT) for measuring the coordinates of the individual particles and an iterative adaptive thresholding technique for computing the local variations in porosity is employed to generate porosity maps. Such maps can be used to gain a more fundamental understanding of the shear characteristics of granular particles. In this paper, author demonstrate the success of technique by exercising the method on several sets of granular particles—glass beads (used as a control), natural Michigan Dune and Daytona Beach sand, and processed Dry #1 sand.