How Import image from MS SQL?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
In stock:
1. MS SQL Database
2. Table of images Images
3. Running BigBase ODBC connection ('Microsoft SQL Server' driver '13 .00.1601 ')
4. Code reading photos using MatLab:
clear all;
close all;
cd 'D:\NEWDoc\MATLAB';
% Make connection to database. Note that the password has been omitted.
% Using ODBC driver.
conn = database ('BigBase', 'user', 'pass');
% Read data from database.
st = 'select top 10 RecID, Image from images';
data = fetch (conn, st);
5. The results:
RecID Image
6143047 5999x1 uint8
224233 8000x1 uint8
4200382 6130x1 uint8
13687913 8000x1 uint8
2212046 8000x1 uint8
8346866 6400x1 uint8
1305479 6760x1 uint8
7806085 6641x1 uint8
6851834 7164x1 uint8
7084710 6550x1 uint8
As you can see, some fields, when imported, are cropped to 8000x1 uint8 it turns out that when importing, large images are lost.
Why? How to fix it?
Additional Information:
In the database, the field Image type - (blob)
5 Kommentare
Kojiro Saito
am 26 Dez. 2018
What is the data type of Image column? Are you using varbinary or varbinary(MAX)?
Antworten (1)
Siehe auch
Kategorien
Mehr zu Database Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

