检测存储在数据库中的图像的颜色 [英] Detecting color of an image stored in the database

查看:122
本文介绍了检测存储在数据库中的图像的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我要做的是将图像存储在数据库中而不是文件系统中。在存储它们之后,我要检测图像是彩色的还是黑白的。白色,将图像裁剪为我稍后指定的大小,等等。

So what I want to do is store images inside a database and not on the file system. And after storing them, i want to detect whether the image is coloured or black& white, crop the image to a size i specify later, etc.

此外,我也不想通过上层应用程序(例如Java,C#)来完成图像处理或PhP,因为我的数据库可以不使用任何上层应用程序而直接访问。

Also, I don't want to get the image manipulation done via the overlying application like Java, C# or PhP as my database may be indirectly accessed without using any overlying application.

为存储图像,我检查了以下DBMS:

For storing images, I checked the following DBMS's:


  1. Oracle多媒体(以前为Intermedia),但实际上找不到图像处理文档,而且安装不同的模块也很混乱。

  2. IBM DB2,即使不再使用图像扩展器,我也找到了合适的第三方图像处理库ImageMagick。从我所读过的内容来看,这是最适合自己需求的扩展数据库,但我对它的实用性表示怀疑,因为它的年代很久( http://www.ibm.com/developerworks/data/library/techarticle/dm-0504stolze/ <-写于2005年)

  3. 具有Filestream的SQL Server,可以在其中将图像存储为BLOB,但是我再次不确定如何满足我的要求。

  4. MongoDB

  1. Oracle Multimedia(formerly Intermedia) but couldn't really find an image manipulation documentation, also the installation of different modules is rather confusing.
  2. IBM DB2 and even though the image extenders have been discontinued, I have found a suitable third party image processing library, ImageMagick. From whatever I have read this is the most suitable database with the extension for my requirement, but i am a bit skeptical about its usefulness as its pretty old (http://www.ibm.com/developerworks/data/library/techarticle/dm-0504stolze/ <- This was written in 2005)
  3. SQL server with Filestream where I can store images as BLOB, but i am again not sure about how can I fulfill my requirements.
  4. MongoDB with GridFS, and this also helps in storing images but not exactly manipulating.

我现在迷失了方向,我需要继续前进的方向这样我就不会再选择合适的数据库了。

I am now lost and require a direction where I can proceed so that I am not stuck anymore at choosing a suitable DB. Any alternative DBMS or method to do the things I want are more than welcome.

推荐答案

在软件世界中(不仅限于此),都可以用任何其他DBMS或方法来实现我想要的事情。人们正在做的事情只能做一件事情,但是他们试图做到这一点,以至于这一件事会完美地完成。创建一个既可以存储信息,又可以用作图像编辑器,视频剪辑增强器和文本阅读器的数据库,没有任何意义。

In software world (and not only there) people are making things that does one thing, but they try to make it in such a way, that this one thing will be done perfectly. It does not make sense much sense to create a database that no only store information, but also be an image editor, video clips enhancer and a text reader.

使其成为一个数据库,如果需要太多,则为每个任务创建3个其他程序。

It is better to make it just a database and if it is so much in need, create 3 other programs for each of this task.

因此,您将找不到一个可以满足要求的数据库您的要求,如果需要,将图像存储在数据库中,然后计算颜色,在应用程序层上调整它们的大小。如果您需要经常执行此操作-然后将它们存储在数据库中,对所需的内容进行预先计算和预先调整大小,并将它们也存储在数据库中。然后根据预先计算的值进行查询。

Therefore you will not find a database which will fulfill your requirements, store images in your database if you want so and then calculate your color, resize them on the application layer. If you need to do this often - then store them in database, precalculate and preresize things you need and store them in database as well. Then query based on precalculated values.

这篇关于检测存储在数据库中的图像的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆