コード例 #1
0
ファイル: Keyence.cs プロジェクト: sim511777/OpenCVSharpTest
        private static KeyenceOffsetTable read_offset_table(BinaryReader p)
        {
            CheckCanReadSize(p, KEYENCE_OFFSET_TABLE_SIZE);

            KeyenceOffsetTable offsettable = new KeyenceOffsetTable();

            offsettable.setting     = p.ReadUInt32();
            offsettable.color_peak  = p.ReadUInt32();
            offsettable.color_light = p.ReadUInt32();

            int i;

            for (i = 0; i < offsettable.light.Length; i++)
            {
                offsettable.light[i] = p.ReadUInt32();
            }
            for (i = 0; i < offsettable.light.Length; i++)
            {
                offsettable.height[i] = p.ReadUInt32();
            }

            offsettable.color_peak_thumbnail = p.ReadUInt32();
            offsettable.color_thumbnail      = p.ReadUInt32();
            offsettable.light_thumbnail      = p.ReadUInt32();
            offsettable.height_thumbnail     = p.ReadUInt32();
            offsettable.assemble             = p.ReadUInt32();
            offsettable.line_measure         = p.ReadUInt32();
            offsettable.line_thickness       = p.ReadUInt32();
            offsettable.string_data          = p.ReadUInt32();
            offsettable.reserved             = p.ReadUInt32();

            return(offsettable);
        }
コード例 #2
0
ファイル: Keyence.cs プロジェクト: sim511777/OpenCVSharpTest
        private static void read_color_images(KeyenceFile kfile, BinaryReader p)
        {
            KeyenceOffsetTable offtable = kfile.offset_table;

            kfile.color_peak = new KeyenceTrueColorImage();
            read_color_image(kfile, kfile.color_peak, offtable.color_peak, p);
            kfile.color_light = new KeyenceTrueColorImage();
            read_color_image(kfile, kfile.color_light, offtable.color_light, p);
        }
コード例 #3
0
ファイル: Keyence.cs プロジェクト: sim511777/OpenCVSharpTest
        private static void read_data_images(KeyenceFile kfile, BinaryReader p)
        {
            KeyenceOffsetTable offtable = kfile.offset_table;
            uint i;

            for (i = 0; i < kfile.light.Length; i++)
            {
                kfile.light[i] = new KeyenceFalseColorImage();
                read_data_image(kfile, kfile.light[i], offtable.light[i], p);
            }
            for (i = 0; i < kfile.height.Length; i++)
            {
                kfile.height[i] = new KeyenceFalseColorImage();
                read_data_image(kfile, kfile.height[i], offtable.height[i], p);
            }
        }