Building Open-CV 4.9.0 with Cuda 12.3 in Windows 11

Using your command line arguments I do not get your first error have you resolved the problem with your environmental variables?

I suspect you still have a problem because CMake/Visual Studio is unable to resolve the location of the CUDA toolkit which is specified by the CUDA_PATH_V12_3 environmental variable. If it is equal to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3 you most likely still have an issue with your envrironmanetal variables.

You can try to force the location with

-T cuda="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.3"

as suggested by the error but I think you will get problems when you try to build.