Tuberculosis Extra Pulmonary (TBEP) is an infectious disease caused by the bacterium Mycobacterium tuberculosis and can cause death. Patients suffering from this disease must be treated quickly without waiting long. Currently, anyone who will be detected caused by this bacterium takes a long time and costs a lot. The biopsy is one of the techniques used to take the patient's lung fluid and give Ziehl Neelsen chemical dye and then observe using a microscope to determine this TBEP disease. This research aims to help detect bacteria quickly and precisely by performing computer-aided image processing by creating an application system. The technique used is to develop the segmentation method. The segmentation process is to develop a Hue Saturation Value (HSV) color space transformation technique with the K-Means and Otsu Thresholding techniques. From the results of the two methods used, it turns out that the Otsu Thresholding method can detect TBEP results with more accuracy than the K-Means method. So the method developed is beneficial in accelerating and minimizing costs for detecting TBEP.