ReshapeMatND() docs is wrong (Bug #3557)
Description
Please see this:
[[http://docs.opencv.org/modules/core/doc/old_basic_structures.html#reshapematnd]]
the function is :C: CvArr* cvReshapeMatND(const CvArr* arr, int sizeof_header, CvArr* header, int new_cn, int new_dims, int* new_sizes)
while the sample uses:IplImage* color_img = cvCreateImage(cvSize(320,240), IPL_DEPTH_8U, 3);
IplImage gray_img_hdr, *gray_img;
gray_img = (IplImage*)cvReshapeND(color_img, &gray_img_hdr, 1, 0, 0);
Apparently the parameter sizeof_header is not given... Add a sizeof(IplImage) is OK...
Associated revisions
Merge pull request #3557 from ilya-lavrenov:sse_add_weighted
History
Updated by Alexander Karsakov about 11 years ago
Hello pei guo.
For this function defined macro which in case sizeof_header is missed uses sizeof(*(header)).
#define cvReshapeND( arr, header, new_cn, new_dims, new_sizes ) cvReshapeMatND( (arr), sizeof(*(header)), (header), (new_cn), (new_dims), (new_sizes))
I think this is a slight inaccuracy in the documentation. Since our resources are limited please consider creating pull request which improves documentation for this function.
You can read more details on how to contribute to OpenCV here:
http://code.opencv.org/projects/opencv/wiki/How_to_contribute
Thanks
- Status changed from New to Open
- Assignee set to pei guo
- Target version set to 2.4.9
Updated by Alexander Karsakov about 11 years ago
- Category set to documentation
Updated by Yash Vadalia about 11 years ago
Updated by Steven Puttemans almost 11 years ago
Looking for pull requests to complete, seems this one was fixed and merged.
I will put it on done!
- % Done changed from 0 to 100
- Status changed from Open to Done