I suggest you create an empty `Mat` here (`new Mat()`) and it'll be allocate on the 1st call to `cvtColor()` in `rgba()` method.