That, or a full outline of the rack, is a big part of the solution. However, the racks in a pool hall would have to be uniform or at least permanently assigned to a table.
You still have to check that the back row balls are frozen to the next row forward, but a T or Triangle outline would at...