To overcome the shortcomings of time-consuming manual measurement methods of fabric density, a novel density measurement method of woven fabrics using image analysis technology via the relative total variation model based on the view of structure extraction from texture (RTV-SFT) is developed. Firstly, a fabric image acquisition system of multi-zoom portable digital microscope is constructed to obtain color dyed fabric images. Secondly, creatively from the perspective of analyzing periodic structure information of image texture information, a new structure extraction from texture algorithm, namely RTV-SFT is proposed to process fabric images to obtain images without non-periodic texture information aiming to achieve accurate yarn segmentation. Finally, the woven fabric density is calculated by effectively adopting the gray level projection method with the improved Gaussian filter algorithm. In the experiment, compared with manual method, the accuracy of the proposed density measurement method is above 93.3%.