[英]How can i retrive my image from sql server 2008 using matlab
i had inserted image in sql server using matlab but when i am retrieving that image i get this [845941x1 int8] as my output so please tell me how will i get my original image using this output........ or any other way to retrieve that image.... 我已经使用matlab在sql服务器中插入了图像,但是当我检索该图像时,我得到了这个[845941x1 int8]作为我的输出,所以请告诉我如何使用该输出来获得我的原始图像........或任何检索该图像的其他方法。
this is my code to insert image: 这是我插入图像的代码:
// conn = database('test','prashant','');
//pes = exec(conn,'insert into filee select ''jpg'' as filetype,* from
//openrowset (bulk ''D:\file\index.jpg'' , single_blob) as x ');
//close(conn);
code to retrieve is: 要检索的代码是:
// conn = database('test','prashant','');
// pess = exec(conn,'select * from filee');
//pess = fetch(pess);
// pess.data[1,3];
// close(conn);
please tell me the code to retrieve my image back..... 请告诉我代码以取回我的图像.....
目前还不清楚您想要什么,如果您想从表中获取信息,也许可以通过以下方法达到目的:
exec(conn,'select * from filee')
I think this vector is the raw database representation of the image... Try to reshape it to it's original size and then to draw it: 我认为此向量是图像的原始数据库表示形式...尝试将其重塑为原始大小,然后绘制它:
image(reshape(int8array,height,width));
But since I just see that your dimension of the int8 array is a prime number I wonder whether it can be reshaped in an image... 但是由于我只是看到int8数组的维数是素数,所以我想知道它是否可以在图像中重塑...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.