OpenCV dependency problem

In order to trim down the default Debian distribution to reclaim some disk space, I had no problem deleting a few things I wouldn’t need like Apache and libsane (not running a server and certainly don’t plan to add a scanner). But trying to remove OpenCV–which is huge–Debian gets confused and tells me that most of X11 / Gtk / FreeDesktop is now unnecessary and can be autoremoved. Of course I don’t want to do this–I need the desktop. I can’t imagine why the desktop thinks it isn’t needed anymore, as if it were a mere dependency of OpenCV (which it is), but not of anything else.