Skip to content

Instantly share code, notes, and snippets.

@immengineer
immengineer / GenTLUSB3OpenCV.py
Created May 7, 2019 05:53
Harvester & OpenCV DisplayImage
from harvesters.core import Harvester
import sys
import traceback
import cv2
def main():
h = Harvester()
h.add_cti_file('C:/Program Files/JAI/SDK/bin/JaiUSB3vTL.cti')
h.update_device_info_list()
ia = h.create_image_acquirer(0)
@immengineer
immengineer / GenTLUSB3-2.py
Last active July 9, 2019 11:11
Harvester Access USB3Camera Data
from harvesters.core import Harvester
h = Harvester()
h.add_cti_file('C:/Program Files/JAI/SDK/bin/JaiUSB3vTL.cti')
h.update_device_info_list()
print("NumberOfCamera = {0}".format(len(h.device_info_list)))
print(h.device_info_list[0])
ia = h.create_image_acquirer(0)
ia.device.node_map.PixelFormat.value = 'BayerRG8'
ia.device.node_map.TestPattern = 'HorizontalColorBar'
ia.start_image_acquisition()
@immengineer
immengineer / GenTLUSB3-1.py
Created May 7, 2019 01:04
Harvester DetectUSB3Camera
from harvesters.core import Harvester
h = Harvester()
h.add_cti_file('C:/Program Files/JAI/SDK/bin/JaiUSB3vTL.cti')
h.update_device_info_list()
print("NumberOfCamera = {0}".format(len(h.device_info_list)))
h.device_info_list[0]
print(h.device_info_list[0])
h.reset()
@immengineer
immengineer / Kx210.cs
Created April 16, 2019 05:15
高砂電源 KX-210制御クラス
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.IO.Ports;
using System.Windows.Forms;
@immengineer
immengineer / Form1.cs
Created February 26, 2019 04:22
eBUS SDK Sample
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
@immengineer
immengineer / Excel.cs
Created February 27, 2018 08:58
Excel 画像ファイル貼付
namespace sample
{
class Excel
{
dynamic excelApp = null;
dynamic workBooks = null;
dynamic workBook = null;
dynamic workSheets = null;
dynamic workSheet = null;
dynamic range = null;
@immengineer
immengineer / Form1.cs
Last active February 17, 2018 04:29
MemoryMappedFile受信側
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "";
@immengineer
immengineer / Form1.cs
Created February 17, 2018 04:18
MemoryMappedFile 送信側
public partial class Form1 : Form
{
private MemoryMappedFile mmf;
public Form1()
{
InitializeComponent();
try
{
mmf = MemoryMappedFile.CreateNew("Test", 1024);
@immengineer
immengineer / Form1.cs
Created October 9, 2017 05:07
JAISDK TimeStamp取得(ChunkDataとImageInfo)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Jai_FactoryDotNET;
using System.Threading;
using System.Runtime.InteropServices;
@immengineer
immengineer / Form1.cs
Created September 29, 2017 08:40
ImageInfo 直接アクセス
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Jai_FactoryDotNET;
using System.Threading;
using System.Runtime.InteropServices;