Calculate CNR