This paper presents a new method of filtering gallbladder contours on static ultrasound images. A major stage in the analysis of ultrasound images is to segment and section off areas occupied by the said organ. In the majority of cases this procedure is a key phase in the process of diagnosing pathological changes in tested organs. Unfortunately ultrasound images present among the most troublesome methods of analysis owing to the echogenic inconsistency of structures under observation. This also applies to the analysis of gallbladder images, chiefly targeted at recognizing changes, which may reveal evidence of developing inflammatory or cancerous changes. This paper provides for an inventive algorithm for the extraction of gallbladder image contours. The algorithm is based on rank filtration, as well as on the analysis of histogram sections on tested organs. The proposed approach of gallbladder image segmentation allows to obtain the effective results of contour detection which exceed 70%. This method is based on two procedures, which independently determine the relevant contour points for both correctly contrasted and vague ultrasound images. The independent results obtained from both procedures when merged allowed for a final determination of a tested organ's actual shape. Defined in such way morphology makes possible to perform a further classification, which is intended to define certain morbid changes such as inflammation, and cancer. The presented approach based on dynamically adjusted contrast improvement, expand traditional methods of ultrasound images segmentation by additional parallel filtration procedures. As shown in the paper such algorithm is easy scalable and effective.