顯示具有 Windows 標籤的文章。 顯示所有文章
顯示具有 Windows 標籤的文章。 顯示所有文章

2016/09/18

[Windows] Visual Studio + OpenCV

Reference:
將OpenCV完美建置於Visual Studio上
Setting Up OpenCV 3.1 in Visual Studio 2015 (Youtube Video)

To make OpenCV work correctly with Visual Studio 2015, you should download OpenCV which version is newer than 3.1

You can use the testing code below to confirm whether it works
Remember to add

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

at the beginning of the source code
#include 
#include 
#include 

using namespace std;
using namespace cv;

int main(int argc, char** argv)
{
 argv[1] = "D:\\picure.jpg";
 Mat image;
 image = imread(argv[1], CV_LOAD_IMAGE_COLOR);

 if (!image.data)
 {
  cout << "No Image" << std::endl;
  return -1;
 }

 namedWindow("Display", CV_WINDOW_NORMAL);
 imshow("Display", image);
 waitKey(0);

 return 0;
}
 

2015/11/01

[Linux] pscp傳檔

(Linux部分皆以傳至Raspberry Pi帳戶pi為例,IP Address請依實際IP來指定)

(1)Windows to Linux:

pscp D:\testfile.txt pi@192.168.0.101:/home/pi/Downloads

(2)Linux to Windows

pscp pi@192.168.0.101:/home/pi/Downloads/testfile.txt D:\

如果要傳送整個目錄,需在路徑之前加上 -r

2015/08/30

[Windows] 光碟機消失解決辦法

從升級方式升到Windows 8或者Windows 10
有時候系統會抓不到光碟機

解決方法是以系統管理員權限執行命令提示字元
並輸入以下指令

reg add "HKLM\System\CurrentControlSet\Services\atapi\Controller0" /f /v EnumDevice1 /t REG_DWORD /d 0x00000001

並重啟電腦

2012/12/16

[Software] Aegisub

A tool can convert subtitles from .ass/.ssa to .srt
support subtitle format: .ass .ssa .srt

Website: http://www.aegisub.org/

2012/05/20

刪除Ubuntu磁區後修復Windwos mbr

如果直接在Windwos底下的磁碟管理工具將Ubuntu所在磁區刪除
下次開機就會碰到GRUB無法抓到分割區的問題
如果要Windows正常運作

以Windows 7為例
用Windows 7安裝光碟開機
選擇修復選項
在命令提示字元中輸入

bootsect /nt60 SYS /mbr

接著重新開機即可

參考:http://ahhafree.blogspot.com/2011/11/ubuntu-grub-rescue.html

2011/07/14

2011/07/13

C++在Widows下指定讀檔路徑



#include <iostream>
#include <fstream>

using namespace std;

int main()

{
    string InFile;
    int SlashNo = 0;
    string LineData = "";

    cout << "Input File Location:";
    getline(cin,InFile);

    for(int i=0; i<InFile.length(); i++)
    {
        if(InFile[i] == '\\')
        {
            SlashNo++;
        }
    }

    cout << "SlashNo = " << SlashNo << endl;


    int TotalLength = InFile.length()+SlashNo+1;
    char RealInputFile[TotalLength];
    int jdx  =0;

    for(int i=0; i<InFile.length(); i++)
    {
        if(InFile[i] == '\\')
        {
            RealInputFile[jdx] = InFile[i];
            jdx++;
            RealInputFile[jdx] = InFile[i];
        }

        else
        {
            RealInputFile[jdx] = InFile[i];
        }
        jdx++;
    }

    RealInputFile[TotalLength-1] = '\0';
    cout << "Current File Location : " << RealInputFile << endl;

    ifstream Source(RealInputFile,ios::in);

    if(Source)
    {
        cout << "Read Secceeded" << endl;
        while(!Source.eof())
        {
            getline(Source,LineData);
            cout << LineData << endl;
            LineData = "";
        }
    }

    else
    {
        cout << "Read Failed" << endl;
    }

    return 0;
}



2011/07/11

解決Windows 7 出現「無法載入遠端連線管理員」的問題

剛剛打開Windows7
預設自動撥號連線出現了「無法載入遠端連連現管理員」的對話框
Google之後找到解法如下:

1.到控制台→系統管理工具→服務
2.找到Remote Access Auto Connection Manager,按右鍵→【啟動】
3.按右鍵→【內容】,將【啟動類型】欄位改為【自動】
4.重新啟動電腦