A flexible and robust phase discrimination algorithm for two-phase PIV employs second-order intensity gradients to identify objects. Then, the objects are sorted into solids and tracers according to parametric combinations of size and brightness. Solids velocities are computed by tracking, gas velocities by cross-correlation. Tests in a fully-developed turbulent channel flow of air showed that the two phases do not contaminate or bias each other's velocity statistics. Error magnitude and valid data yield were quantified with artificial images for three particle sizes (25, 33, and 63 μm), two interrogation area sizes (32 and 64 pixels), and volumetric solids loads from 0.0022% to 0.014%. At the channel centerline, the gas valid data yield was above 98% and the RMS error in gas velocity was less than 0.1 pixels for all variations of these parameters. The solid-to-tracer signal ratio was found to be the major parameter affecting the magnitude of the RMS error.