About the widthstep of Iplimage

Source: Internet
Author: User

The two days of programming to achieve the same state filter, can achieve the results of my glasses, the image of the filter after a serious dislocation, can not distinguish the content of the image, check the program did not find errors, which let me have been very depressed. This morning in Baidu to search for a post, the post is someone else, but the original post author also encountered such errors. The author says an even-numbered picture doesn't happen, but a picture with an odd width will cause the error above. I also took a few pictures to experiment with, as the author said. The reason, originally is Iplimage widthstep in mischief, when width is even, widthstep and width*nchannels equal, but when width is odd, will fill a unit pixel length makes widthstep become even. Read the post, I also found the cause of the error, I immediately modify the program. Oh, the results are normal display. Just change the i*width+j of reading data to I*widthstep+j.

Reprint website: http://blog.csdn.net/myas0735/article/details/6939419

About the widthstep of Iplimage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.