Error when using the cv::transposeND

I want to learn how to use the the cv::transposeND, then I write following code:

std::string file_path = "dog.jpg"; 
cv::Mat bgr_image = cv::imread(file_path, cv::IMREAD_COLOR);
cv::Mat chw_bgr_image;
cv::transposeND(bgr_image, {2,0,1}, chw_bgr_image);

But execute the .exe, it throw error:

OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.6.0) Error: Unspecified error (> Input array should be single-channel (expected: 'inp.channels() == 1'), where
>     'inp.channels()' is 3
> must be equal to
>     '1' is 1
) in void __cdecl cv::transposeND(const class cv::_InputArray &,const class std::vector<int,class std::allocator<int> > &,const class cv::_OutputArray &), file c:\build\master_winpack-build-win64-vc15\opencv\modules\core\src\matrix_transform.cpp, line 290