In case protest is made against the payment of any towing charge or storage costs, the sheriff may authorize the discharge of the vehicle if the protestant shall be charged with a violation of the traffic ordinance and shall be required to make bond for his appearance and trial before the municipal court judge. Whereupon, the sheriff shall authorize the release of the vehicle to the protestant. If such person is convicted of violating the traffic ordinance by the municipal court judge, in addition to other costs, the municipal judge shall assess as costs the storage costs and towing charges which have accumulated in connection with the impounding of the vehicle.