Skip to content

Instantly share code, notes, and snippets.

@immengineer
immengineer / GenTLUSB3OpenCV.py
Created May 7, 2019
Harvester & OpenCV DisplayImage
View GenTLUSB3OpenCV.py
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 Jul 9, 2019
Harvester Access USB3Camera Data
View GenTLUSB3-2.py
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
Harvester DetectUSB3Camera
View GenTLUSB3-1.py
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 Apr 16, 2019
高砂電源 KX-210制御クラス
View Kx210.cs
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 Feb 26, 2019
eBUS SDK Sample
View Form1.cs
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 Feb 27, 2018
Excel 画像ファイル貼付
View Excel.cs
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 Feb 17, 2018
MemoryMappedFile受信側
View Form1.cs
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "";
@immengineer
immengineer / Form1.cs
Created Feb 17, 2018
MemoryMappedFile 送信側
View Form1.cs
public partial class Form1 : Form
{
private MemoryMappedFile mmf;
public Form1()
{
InitializeComponent();
try
{
mmf = MemoryMappedFile.CreateNew("Test", 1024);
@immengineer
immengineer / Form1.cs
Created Oct 9, 2017
JAISDK TimeStamp取得(ChunkDataとImageInfo)
View Form1.cs
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 Sep 29, 2017
ImageInfo 直接アクセス
View Form1.cs
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;
You can’t perform that action at this time.