Development of Portable PIV Devices

In the present study, a portable PIV device is developed for surface flow velocity measurement, which mainly integrates the laser-projecting module with the smart phone. With 4 laser points projected on the flow surface as reference scale, it can capture flow images, process image ortho-rectification, do PIV calculation and perform velocity vector all in the smart phone. Two cases are conducted to test its capability and applicability. In general, the preliminary test results are quite well.


Introduction
The measurement of river flow velocities and discharges has been a very difficult task, especially during floods.In the last decade, the particle image velocimetry (PIV) methods have drawn significant attention due to its non-contact, large-scale, intuitive measurement characteristics (1)(2)(3)(4)(5) .Basically, PIV methods comprise three main components: the image recording, the image ortho-rectification, and the image processing.The conventional PIV usually uses external cameras for capturing images and conducts the image processing on computers or laptops.However, for the image ortho-rectification, it usually takes a lot of efforts to obtain ground control points in the fields, reducing its immediacy and maneuverability.
Nowadays, due to the fast development of smart phone technologies, it becomes feasible to perform PIV measurement on a smart phone, which has already integrated the camera and computation functions.In addition, in order to quickly obtain the reference points for the image ortho-rectification, the laser-positioning techniques (6) can be applied.Based on the above concept, in the present study, a potable PIV device is developed for the free surface velocity measurement.This device mainly integrates the laser-positioning techniques, the camera functions and PIV computation on a smart phone.It has the advantages of high mobility, high immediacy and low cost.

Measuring system
By equipping a laser-projecting module on a smart phone, the prototype of the portable PIV device can be easily obtained, as shown in Fig. 1.This PIV device can project four laser points on the flow surface as reference scale and use the lens of smart phone to capture flow images.Then, the image processing can be conducted on the smart phone to immediately perform the PIV computational results.
Figure 2 shows the flowchart of portable PIV measurement.In this study, the Android system is adopted for developing PIV APP on a smart phone.The Java programming language and OpenCV libraries are used to develop core image processing algorithms.Below, the laser-positioning method and the image processing algorithms for velocity recognition are described.

Laser-positioning method
A laser-projecting module attached on the smart phone can parallelly project 4 laser points on the flow surface as the reference scale.As shown in Fig. 3, based on the projecting angles of the lasers, the ground coordinates of laser points on the flow surface can be calculated as follows: where W and H are the width and height of the laser-projecting module, respectively; α and β are the yaw angle and pitch angle of the PIV device, respectively, which can be measured by the sensors of smart phone.Then, the red-area detection algorithm (7) is adopted for recognizing the image coordinates of laser points as follows: where R, G, B are three components of color intensity for each image pixel, which values are between 0 and 255.According to Eq. ( 2), 4 red-area groups representing 4 laser points can be recognized and their image coordinates can be determined by their centroids.In the present study, the two-dimensional projection relation (8) is used to establish the mapping relationship for image ortho-rectification as follows:  3) can be used for the image ortho-rectification as shown in Fig. 4.

Surface velocity recognition
Conventional PIV algorithms estimating surface velocities are analyzing the cross-correlation of 2 consecutive flow images with a small time interval dt.A fixed-size window (Interrogation Area, IA) is selected in the first image (at time t), and the corresponding window in the second image (at time t+1) is then chosen for calculating the cross-correlation coefficient as follows: with the dt.In the present study, the image size captured by the lens of smart phone is 1280×960 pixels, and the IA size is usually adopted by 32×32 or 64×64 pixels.In addition, in order to improve the measurement accuracy, the quadratic fitting is applied to the cross-correlation distribution to reach the sub-pixel accuracy (1) .

System tests 3.1 Scenario 1
The first PIV APP designed is capable of loading images to do PIV computation (cross-correlation analysis) and perform velocity vectors on the smart phone.To validate the PIV algorithm, the standard test images provided at http://www.pivchallenge.org (2)are employed.Fig. 5 shows the vortex flow computed on the smart phone.The result compares to other PIV results quite well.

Scenario 2
The second PIV APP is designed to fully follow the measurement steps of the portable PIV described in Section 2. Fig. 6 shows the graphic user interface of this APP.First, pressing the 'GetANGLE' button, the system will use the accelerometer sensor to get the laser projection angles and calculate 4 laser points' ground coordinates.Next, pressing 'GetLASER' button, the system will use red-area detection algorithm to get 4 laser points' image coordinates.Then, pressing 'GetORTHO' button, the system will establish the mapping relationship and perform the ortho-transformed image on the screen.After that, Pressing 'NativePIV' button, the system will quickly capture 2 consecutive flow images, do the cross-correlation analysis and perform the velocity vectors on the screen repeatedly.Finally, pressing 'UploadFTP' button, the system will upload the PIV measurement results onto a remote FTP site via 3G or WiFi wireless network.

Conclusions
In this study, a portable PIV device is developed for surface flow velocity measurement.This system mainly integrates the laser-positioning techniques with the lens, sensor and computation functions of the smart phone.In particular, it solves the difficulties for obtaining ground control points in traditional PIV methods.In addition, all the image processing can be done on the smart phone, hence, it has the advantages of high mobility, high immediacy and low cost.Two cases are employed to test its capability and applicability.The preliminary results are quite promising.For the future work, more experiments should be carried out to fully validate the proposed portable PIV measurement system.

Fig. 3
Fig. 3 Ground coordinates of laser points x and y are in the ground coordinates; x' and y' are in the image coordinates; 8 1 ~c c are coefficients which can be determined by the ground and image coordinates of 4 laser points.After 8 1 ~c c are determined, Eq. ( time t and t+1, respectively; M and N are the sizes of IA window; m and n are the movement index.After the IA window searching in the second image with different m and n, the obtained maximum value of

Fig. 5
Fig. 5 Vortex flow computed on the smart phone

Fig. 7
Fig. 7 Portable PIV velocity measurement tested in a hydraulic model experiment