MONTREAL - Railways operating in Canada would be required to install locomotive voice and video recorders as a safety measure under legislation introduced Tuesday, but the union representing workers is vowing to fight the change over privacy concerns.

"This is a full violation of privacy," said Don Ashley, national legislative director for Teamsters Canada Rail Conference, who will take the fight to Canada's privacy commissioner.

He said the union has no problems with the devices being used on locomotives as long as information isn't shared with the railways.

Transportation Minister Marc Garneau says the law addresses employee privacy concerns by limiting how the data is used by railways. However, the union says once they gain access they will be able to use it for whatever they want because there will be no government oversight.

"Once something is seen it can't be unseen," Ashley said. "There is certainly one of the federal carriers out there that will use this to target and persecute employees."

The Transportation Safety Board identified the need for the devices after a 2012 accident in Burlington, Ont., that claimed the lives of three Via Rail employees.

Canadian Pacific Railway (TSX:CP) declined to comment on the union's objections, but CEO Keith Creel said using the technology proactively will prevent incidents and improve rail safety, "further protecting the public, our employees and the goods we transport for our customers."

"We believe this technology is a powerful and important tool in the investigative process to get to a better understanding of causation, which will lead to improved safety practices - something we all want," CN Rail (TSX:CNR) chief executive Luc Jobin added in a statement.

After consultations with companies, unions and the safety board, Garneau decided to allow the recorders to be used proactively before an incident.

Companies would gain access to data on the recorders to determine the cause of a reportable accident or incident the Transportation Safety Board is not investigating, to address a known safety threat, or to do a random sampling analysis to identify safety concerns.

Transport Canada can use the data to look for trends to inform policy making, investigate accidents not being looked at by the safety board or to ensure compliance with the use of the recorders under the law.

The legislation also designed to promote transparency and efficiency will require railways to provide data on rates, service and performance, allow captive shippers to access a competing railway's network, define the level of service that should be provided, and allow shippers to seek financial penalties for poor performance.

The government decided to maintain the cap on the transport of Western grain, also known as the maximum revenue entitlement, that has been in place since 2000.

Garneau said there will be changes in how the cap is calculated.

"It's in our interest to make sure that our railways are healthy and able to handle all of the merchandise," he said at a news conference.

Jobin welcomed changes that would remove disincentives to acquire hopper cars. However, he warned that allowing shippers access to competitor railway networks may have unintended consequences and give U.S. railways access to the Canadian market at regulated rates, without reciprocity.