I have seen many code samples for loading textures for OpenGL, many of them a bit complicated to understand or requiring new functions with a lot of code. <
from this doc, I suggest you to change your test:
texture_cv = imread("stones.jpg"); if (texture_cv.data != NULL) { ...