Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
grayValue = (int)((gray.pixels[locGray])) ;
灰度值应该是正的有什么帮助吗?
locGray 是否在数组的范围内?如果超出范围,您可能会从内存中读取随机值,这是 c/c++