什么时候创建了SQLite数据库文件?

时间:2018-01-26 20:12:06

标签: c# sqlite uwp

我运行以下代码来测试Sqlite,但似乎没有创建数据库文件。什么时候应该创建?我以为该文件是在当前目录中创建的(在我的情况下是调试)但我在解决方案的任何地方都找不到它。

我的代码:

clear;
clc;

RGB = imread('pillsetc.png');
I = rgb2gray(RGB);
bw = imbinarize(I);
imshow(bw)

% remove all object containing fewer than 30 pixels
bw = bwareaopen(bw,30);

% fill any holes, so that regionprops can be used to estimate
% the area enclosed by each of the boundaries
bw = imfill(bw,'holes');

imshow(bw)

[B,L] = bwboundaries(bw,'noholes');

% Display the label matrix and draw each boundary
imshow(label2rgb(L, @jet, [.5 .5 .5]))
hold on
for k = 1:length(B)
  boundary = B{k};
  plot(boundary(:,2), boundary(:,1), 'w', 'LineWidth', 2)
end

s = regionprops(L, 'MajorAxisLength','MinorAxisLength', 'Centroid', 'Orientation');
hold on

% Display the label matrix and draw each boundary
phi = linspace(0,2*pi,50);
cosphi = cos(phi);
sinphi = sin(phi);

for k = 1:length(s)
    xbar = s(k).Centroid(1);
    ybar = s(k).Centroid(2);

    a = s(k).MajorAxisLength/2;
    b = s(k).MinorAxisLength/2;

    theta = pi*s(k).Orientation/180;
    R = [ cos(theta)   sin(theta)
         -sin(theta)   cos(theta)];

    xy = [a*cosphi; b*sinphi];
    xy = R*xy;

    x = xy(1,:) + xbar;
    y = xy(2,:) + ybar;

    plot(x,y,'r','LineWidth',2);
end
hold off 

1 个答案:

答案 0 :(得分:0)

我使用Entity Framework将我的解决方案切换为一个,所以我不确定答案是否会有所不同。当我调用EnsureCreated时会创建db文件。

href

该文件的位置为C:\ Users \ MY_NAME \ AppData \ Local \ Packages \ package_id \ LocalStat e。