Video extensometer

In 2010, I started working in a small company producing testing machines (machines for physical and mechanical testing for tension, compression), where I was mainly involved in developing software for controlling testing machines, as well as collecting and analyzing the obtained data.


After about half a year, having delved into the essence of the work, the first versions of programs appeared, under the control of which the machines began to “come to life”.

Program for controlling the testing machine and analyzing the obtained data

Program for controlling the testing machine and analyzing the obtained data

It is worth noting that at that time not all manufacturers of such equipment in Russia had PC control, mostly these were remote controls on a microcontroller with a small LCD or, in rare cases, a monochrome graphic display. In addition to drives and sensors, only a raster printer could be connected to such remote controls, and the test protocol also left much to be desired. Everything would be fine, but then customer requests began to grow, and the functionality of the remote control was not enough, and with developers on microcontrollers everything was pretty sad. Therefore, the remote control became a kind of bridge between mechanics and a computer.

Some types of tests required the installation of a strain measuring device (SMD) on the specimen to obtain a more accurate measurement of the linear strain at break.

The mechanical UID consisted of two clamps in the form of clothespins installed on the sample in the elongation zone. The clamps were connected to cables passing through rollers on the encoder shafts. A counterweight was fixed at the ends of the cables to level the weight of the clamps and mechanical resistance in the UID mechanism.

Diving deeper into testing equipment, it turned out that there are also contactless devices for measuring deformation, such as video and laser extensometers. I will say little about the latter, but we will focus on the video extensometer.

In general, I was hooked by the idea of ​​creating my own device with software adapted to our purposes. Of course, I did not find anything produced in Russia, all that was offered were resale foreign developments. The management, represented by the director, was somehow skeptical about this idea, and did not believe that I could succeed. But the interest was so strong that I did it outside of working hours, especially since my pride was affected.

Initially, I wanted to check and see how feasible it was with my level of programming skills. At that time, I was programming in Delphi (maybe someone else remembers this development environment) and I can’t say that I was very good, but I was learning.

The first thing I did was write a simple program to determine the distance from a photo in manual mode. It required first making adjustments, that is, specifying what distance corresponds to one point, then you could upload a photo with a measured sample, specify two boundaries between which you need to make a measurement and then get the result. This is, of course, a bit of a gimmick, but you had to start with something simple.

Of course, the main task was to get the distance between two marks in a continuous video stream. Then it was necessary to hook up a video stream to this program, and here I encountered the first problems of how to implement this. As a result, I found one library of components that allowed me to work with video. I attached the video to my program, emitted a sample with marks, and wrote a simple algorithm for frame-by-frame search for a mark in a frame by RGB values. And during the tests, the program began to freeze, since it processed the frame pixel by pixel, and even with a web camera resolution of 640×480 pixels, everything slowed down.

After some time it became clear that I needed something more adapted to my tasks. Then I came across OpenCV, and another snag arose, the library I found and all the examples for it were written in C++. Since the interest had not yet died down, I began to gradually integrate into OpenCV, with ready-made examples of course it was not very difficult to do, since the main task was to find two marks of the same color. This library coped with this quite well.

Then it became necessary to simulate the test. To do this, it was necessary to make a stand that vaguely resembled a tensile testing machine. At that time, I got a small portal-type CNC machine, on which I cut parts from organic glass and assembled a model. The model included the ability to clamp a rubber sample and stretch it, as well as a platform for installing a web camera with the ability to move it in order to increase the measured range and focal length.

3D model of the test layout

3D model of the test layout

After assembling the model, I started testing and debugging the program. As a result, the program worked, but its testing revealed a couple of main problems: It was necessary to select the type of marks applied to the test sample. At that time, I used pieces of colored self-adhesive film. Now, using a permanent marker comes to mind. The next problem came from the constant adjustment of the search for a color mark depending on the external lighting. The marks could glare in daylight from the window and the shade changed slightly, or, conversely, the color of the mark was darker in cloudy weather. Here you can see the installation of directional illumination of the sample next to the camera.

Latest version of the program

Latest version of the program

It is also worth noting the fact that instead of a web camera, you should install a more specialized camera with good optics to adjust the focus and viewing angle.

Overall, the algorithm worked, but rather unstable. The project was still raw, but promising, as it seemed to me then. Soon, circumstances developed in such a way that I had to quit and the project was abandoned.

The writing of this article was prompted by a randomly found screenshot of the program and photographs of the layout.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *