We consider a Riesz ϕ-variation for functions f defined on the real line when φ:Ω×[0,∞)→[0,∞) is a generalized Φ-function. We show that it generates a quasi-Banach space and derive an explicit formula for the modular when the function f has bounded variation. The resulting BV-type energy has previously appeared in image restoration models. We generalize and improve previous results in the variable exponent and Orlicz cases and answer a question regarding the Riesz--Medvedev variation by Appell, Banaś and Merentes [\emph{Bounded Variation and Around}, Studies in Nonlinear Analysis and Applications, Vol. 17, De Gruyter, Berlin/Boston, 2014].