How to detect movement edge from fixed edge with Python Opencv? for specific length detection

Currently I have a project that related to measure the fabric’s length detection that i hope to use openCV python for programming.

Here is my idea in the below image,and please give me any suggestions on whether the measured length can be achieved using openCv? I can elaborate on this if anything unclear of the whole process.

Keyword : Fabric edge lay on the table (start to detect the edge) → cut the fabric to produce the other edge Calculation : Edge to Edge distance Help : What kind of tool should i use ? openCV+ROI+Camera capturing