Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello Im trying to write a matlab script that can fetch images for mySQL database -> Process them & send their result to another table. I have already install JDBC driver and here is my script so far.

C#
function [res] = photom()
conn = database('e_gardener','root','',...
'Vendor','MySQL',...
'Server','localhost');
srcFiles = dir('C:\xampp\htdocs\V\uploads\*.png');  % the folder in which ur images exists
for k=1:100 %suppose there are 10 image
file_name= strcat('C:\xampp\htdocs\V\uploads\',srcFiles(k).name); % the path tht u have imges
  IM = imread(file_name); 
  res = Detect(IM);
  disp(res);
 datainsert(conn,'photo',{'Result'},{res})
end
end



C#
<pre lang="C#">The problem with this script is.. its gets breaked when there are less then 100 images in database..

I want to write a script that can only fetch unprocessed images from database and can only when new images in data base is inserted.. in short i want my script to work as a web application.. by which if more than one user send image to database it should work ok..

im uploading these images from a android mobile application by which user can upload its image to mySQL database then Matlab script fetch that image and process the image and save its result to database from which android application fetch result and display to the user.

Help me please im stuck :(</pre>


What I have tried:

I have tried above code but its not giving expected result
Posted
Updated 19-Dec-16 5:21am
Comments
Dave Kreskowiak 16-Dec-16 19:38pm    
You never said where you are stuck or described a problem. Just saying "this is what I want to do" is not a problem description.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900