图像处理更新
This commit is contained in:
@@ -419,7 +419,7 @@ export const SCREEN_SHOW_CAM_GRAPH_SHOOT = {
|
||||
this.appendValueInput("SUB")
|
||||
.appendField(Blockly.Msg.OLEDDISPLAY + Blockly.Msg.MIXLY_MICROBIT_IMAGE)
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
this.setInputsInline(true);
|
||||
@@ -441,7 +441,7 @@ export const SCREEN_DISPLAY_IMAGE = {
|
||||
['270','270']
|
||||
]),'angle');
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
this.setInputsInline(true);
|
||||
@@ -844,6 +844,8 @@ export const GET_QR_CODE_RECOGNITION_DATA = {
|
||||
.setCheck("var");
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_GET_QR_CODE_RECOGNITION_RESULT);
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
@@ -852,58 +854,46 @@ export const GET_QR_CODE_RECOGNITION_DATA = {
|
||||
export const GET_COLOR_DETECTION_NUM = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_RECOGNITION + Blockly.Msg.MIXLY_HOW_MUCH)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.COLOUR_RGB_RED,"0"],
|
||||
[Blockly.Msg.COLOUR_RGB_ORANGE,"1"],
|
||||
[Blockly.Msg.COLOUR_RGB_YELLOW,"2"],
|
||||
[Blockly.Msg.COLOUR_RGB_GREEN,"3"],
|
||||
[Blockly.Msg.COLOUR_RGB_CYAN,"4"],
|
||||
[Blockly.Msg.COLOUR_RGB_BLUE,"5"],
|
||||
[Blockly.Msg.COLOUR_RGB_PURPLE,"6"],
|
||||
[Blockly.Msg.COLOUR_RGB_WHITE,"7"],
|
||||
[Blockly.Msg.COLOUR_RGB_GREY,"8"],
|
||||
[Blockly.Msg.MIXLY_CUSTOM_STUDY,"9"]
|
||||
]),'color');
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_Pixel_block);
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_HOW_MUCH + Blockly.Msg.MIXLY_REGISTER + Blockly.Msg.HTML_COLOUR )
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
// this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
}
|
||||
};
|
||||
|
||||
export const GET_COLOR_DETECTION_LOCATION = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput('NO')
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.COLOUR_RGB_RED,"0"],
|
||||
[Blockly.Msg.COLOUR_RGB_ORANGE,"1"],
|
||||
[Blockly.Msg.COLOUR_RGB_YELLOW,"2"],
|
||||
[Blockly.Msg.COLOUR_RGB_GREEN,"3"],
|
||||
[Blockly.Msg.COLOUR_RGB_CYAN,"4"],
|
||||
[Blockly.Msg.COLOUR_RGB_BLUE,"5"],
|
||||
[Blockly.Msg.COLOUR_RGB_PURPLE,"6"],
|
||||
[Blockly.Msg.COLOUR_RGB_WHITE,"7"],
|
||||
[Blockly.Msg.COLOUR_RGB_GREY,"8"],
|
||||
[Blockly.Msg.MIXLY_CUSTOM_STUDY,"9"]
|
||||
]),'color');
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_Pixel_block + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
// this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
}
|
||||
};
|
||||
// export const GET_COLOR_DETECTION_LOCATION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('NO')
|
||||
// .appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2)
|
||||
// .appendField(new Blockly.FieldDropdown([
|
||||
// [Blockly.Msg.COLOUR_RGB_RED,"0"],
|
||||
// [Blockly.Msg.COLOUR_RGB_ORANGE,"1"],
|
||||
// [Blockly.Msg.COLOUR_RGB_YELLOW,"2"],
|
||||
// [Blockly.Msg.COLOUR_RGB_GREEN,"3"],
|
||||
// [Blockly.Msg.COLOUR_RGB_CYAN,"4"],
|
||||
// [Blockly.Msg.COLOUR_RGB_BLUE,"5"],
|
||||
// [Blockly.Msg.COLOUR_RGB_PURPLE,"6"],
|
||||
// [Blockly.Msg.COLOUR_RGB_WHITE,"7"],
|
||||
// [Blockly.Msg.COLOUR_RGB_GREY,"8"],
|
||||
// [Blockly.Msg.MIXLY_CUSTOM_STUDY,"9"]
|
||||
// ]),'color');
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_Pixel_block + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// // this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
// }
|
||||
// };
|
||||
|
||||
export const GET_CAT_FACE_DETECTION_NUM = {
|
||||
init: function () {
|
||||
@@ -911,22 +901,39 @@ export const GET_CAT_FACE_DETECTION_NUM = {
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_RECOGNITION + Blockly.Msg.MIXLY_HOW_MUCH +Blockly.Msg.MIXLY_CAT_FACE)
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_HOW_MUCH +Blockly.Msg.MIXLY_CAT)
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
// this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
}
|
||||
};
|
||||
|
||||
export const GET_CAT_FACE_DETECTION_LOCATION = {
|
||||
// export const GET_CAT_FACE_DETECTION_LOCATION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('NO')
|
||||
// .appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2 + Blockly.Msg.MIXLY_CAT_FACE + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// // this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
// }
|
||||
// };
|
||||
|
||||
export const GET_HUMAN_DETECTION_NUM = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput('NO')
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2 + Blockly.Msg.MIXLY_CAT_FACE + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_HOW_MUCH +Blockly.Msg.MIXLY_HUMAN)
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
// this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
@@ -936,129 +943,174 @@ export const GET_CAT_FACE_DETECTION_LOCATION = {
|
||||
export const GET_FACE_DETECTION_NUM = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_RECOGNITION + Blockly.Msg.MIXLY_HOW_MUCH +Blockly.Msg.MIXLY_FACE)
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_HOW_MUCH +Blockly.Msg.MIXLY_FACE)
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
// this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
}
|
||||
};
|
||||
|
||||
export const GET_FACE_DETECTION_LOCATION = {
|
||||
export const GET_FACE_DETECTION_NAME = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput('NO')
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2 + Blockly.Msg.MIXLY_FACE + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_AipFace +Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_NAME)
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
// this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
}
|
||||
};
|
||||
|
||||
export const GET_FACE_DETECTION_KEYPOINT_LOCATION = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput('NO')
|
||||
.appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2 + Blockly.Msg.MIXLY_FACE);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_KEYPOINT)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.MIXLY_LEFT_EYE,"0"],
|
||||
[Blockly.Msg.MIXLY_RIGHT_EYE,"1"],
|
||||
[Blockly.Msg.MIXLY_NOSE,"2"],
|
||||
[Blockly.Msg.MIXLY_LEFT_MOUSE_CORNER,"3"],
|
||||
[Blockly.Msg.MIXLY_RIGHT_MOUSE_CORNER,"4"]
|
||||
]),'kp')
|
||||
.appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
// export const GET_FACE_DETECTION_LOCATION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('NO')
|
||||
// .appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2 + Blockly.Msg.MIXLY_FACE + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// // this.setTooltip(Blockly.Msg.MIXLY_GET_COLOR_DETECTION_RESULT_TOOLTIP);
|
||||
// }
|
||||
// };
|
||||
|
||||
export const GET_FACE_RECOGNITION_ID = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_RECOGNITION_RECGNITION + Blockly.Msg.MIXLY_FACE + 'ID');
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
// export const GET_FACE_DETECTION_KEYPOINT_LOCATION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('NO')
|
||||
// .appendField(Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER1);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_4DIGITDISPLAY_NOMBER2 + Blockly.Msg.MIXLY_FACE);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_KEYPOINT)
|
||||
// .appendField(new Blockly.FieldDropdown([
|
||||
// [Blockly.Msg.MIXLY_LEFT_EYE,"0"],
|
||||
// [Blockly.Msg.MIXLY_RIGHT_EYE,"1"],
|
||||
// [Blockly.Msg.MIXLY_NOSE,"2"],
|
||||
// [Blockly.Msg.MIXLY_LEFT_MOUSE_CORNER,"3"],
|
||||
// [Blockly.Msg.MIXLY_RIGHT_MOUSE_CORNER,"4"]
|
||||
// ]),'kp')
|
||||
// .appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
// export const GET_FACE_RECOGNITION_ID = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_RECOGNITION_RECGNITION + Blockly.Msg.MIXLY_FACE + 'ID');
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
// export const GET_FACE_RECOGNITION_ID_LOCATION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('NO')
|
||||
// .appendField(Blockly.Msg.MIXLY_GET +'ID'+ Blockly.Msg.MIXLY_AS);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_FACE + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
// export const GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('NO')
|
||||
// .appendField(Blockly.Msg.MIXLY_GET + 'ID'+ Blockly.Msg.MIXLY_AS);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_FACE);
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.MIXLY_KEYPOINT)
|
||||
// .appendField(new Blockly.FieldDropdown([
|
||||
// [Blockly.Msg.MIXLY_LEFT_EYE,"0"],
|
||||
// [Blockly.Msg.MIXLY_RIGHT_EYE,"1"],
|
||||
// [Blockly.Msg.MIXLY_NOSE,"2"],
|
||||
// [Blockly.Msg.MIXLY_LEFT_MOUSE_CORNER,"3"],
|
||||
// [Blockly.Msg.MIXLY_RIGHT_MOUSE_CORNER,"4"]
|
||||
// ]),'kp')
|
||||
// .appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
// export const PEOPLE_FACE_ENROLL = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendDummyInput()
|
||||
// .appendField(Blockly.Msg.FACE_ENROLL);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
// export const DELETE_PEOPLE_FACE_ID= {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput("ID")
|
||||
// .appendField(Blockly.Msg.MIXLY_DELETE_PEOPLE_FACE_ID);
|
||||
// this.setPreviousStatement(true);
|
||||
// this.setNextStatement(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
// export const MODELP_SIMPLELY_RUN_RECOGNIZION = {
|
||||
// init: function () {
|
||||
// this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
// this.appendValueInput('SUB')
|
||||
// .appendField(Blockly.Msg.MIXLY_RUN + Blockly.Msg.MIXLY_TENSORFLOW_MODEL + Blockly.Msg.MIXLY_RECOGNITION_RECGNITION)
|
||||
// .setCheck("var");
|
||||
// this.appendValueInput('CAM')
|
||||
// .setCheck("var");
|
||||
|
||||
// this.appendDummyInput("")
|
||||
// .appendField(new Blockly.FieldDropdown([
|
||||
// [Blockly.Msg.MIXPY_AI_RESULT,"data"],
|
||||
// [Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_HOW_MUCH + Blockly.Msg.MIXPY_OBJECT,"len"],
|
||||
// [Blockly.Msg.MIXLY_GET + Blockly.Msg.MIXLY_AipFace + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_NAME,"person"]
|
||||
// ]),"key")
|
||||
// this.appendValueInput('VAR')
|
||||
// .appendField(Blockly.Msg.HTML_COLOUR)
|
||||
// this.appendValueInput('boolean')
|
||||
// .appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
// this.setOutput(true);
|
||||
// this.setInputsInline(true);
|
||||
// }
|
||||
// };
|
||||
|
||||
export const GET_FACE_RECOGNITION_ID_LOCATION = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput('NO')
|
||||
.appendField(Blockly.Msg.MIXLY_GET +'ID'+ Blockly.Msg.MIXLY_AS);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_FACE + Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
export const GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput('NO')
|
||||
.appendField(Blockly.Msg.MIXLY_GET + 'ID'+ Blockly.Msg.MIXLY_AS);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_FACE);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_KEYPOINT)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.MIXLY_LEFT_EYE,"0"],
|
||||
[Blockly.Msg.MIXLY_RIGHT_EYE,"1"],
|
||||
[Blockly.Msg.MIXLY_NOSE,"2"],
|
||||
[Blockly.Msg.MIXLY_LEFT_MOUSE_CORNER,"3"],
|
||||
[Blockly.Msg.MIXLY_RIGHT_MOUSE_CORNER,"4"]
|
||||
]),'kp')
|
||||
.appendField(Blockly.Msg.blockpy_set_of + Blockly.Msg.MIXLY_POSITION_XY);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
export const PEOPLE_FACE_ENROLL = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.FACE_ENROLL);
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
export const DELETE_PEOPLE_FACE_ID= {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.setCheck("var");
|
||||
this.appendValueInput("ID")
|
||||
.appendField(Blockly.Msg.MIXLY_DELETE_PEOPLE_FACE_ID);
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const AI_STOP_ACQUISITION = {
|
||||
@@ -1083,4 +1135,89 @@ export const MIXIO_REPORT_IMAGE_DATA = {
|
||||
this.setOutput(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
//simplified part
|
||||
export const CREATE_CAMERA_SIMPLE = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_SETUP + Blockly.Msg.MIXLY_SMARTCAMERA)
|
||||
.appendField(Blockly.Msg.MIXLY_SHOOTING_SIZE)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
['240px*240px', "R240X240"],
|
||||
['320px*320px', "R320X320"],
|
||||
['128px*128px', "R128X128"],
|
||||
['96px*96px', "R96X96"],
|
||||
['VGA : 640px*480px', "VGA"],
|
||||
['HVGA : 480px*320px', "HVGA"],
|
||||
['QVGA : 320px*240px', "QVGA"],
|
||||
['QQVGA : 160px*120px', "QQVGA"]
|
||||
]), "cmd");
|
||||
this.setPreviousStatement(true);
|
||||
this.setNextStatement(true);
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
|
||||
export const AI_CAMERA_INIT_SIMPLE = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.appendField(Blockly.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE)
|
||||
.setCheck("var");
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_SETUP + Blockly.Msg.LISTS_SET_INDEX_INPUT_TO)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.MIXLY_QR_CODE + Blockly.Msg.MIXLY_RECOGNITION, "QRReader"],
|
||||
[Blockly.Msg.MIXLY_COLOR_RECOGNTITION, "ColorDetector"],
|
||||
[Blockly.Msg.MIXLY_CAT + Blockly.Msg.MIXLY_RECOGNITION, "CatDetector"],
|
||||
[Blockly.Msg.MIXLY_HUMAN + Blockly.Msg.MIXLY_RECOGNITION, "HumanDetector"],
|
||||
[Blockly.Msg.MIXLY_FACE_CLASSIFIER, "FaceDetector"],
|
||||
[Blockly.Msg.MIXLY_AipFace,"FaceRecognizer"]
|
||||
]), "kind");
|
||||
this.setInputsInline(true);
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
}
|
||||
};
|
||||
|
||||
export const Register_color_recognition_fixed_SIMPLE = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.appendField(Blockly.Msg.MIXLY_TENSORFLOW_MODEL)
|
||||
.setCheck("var");
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_REGISTER + Blockly.Msg.MIXLY_RECOGNITION_RECGNITION + Blockly.Msg.HTML_COLOUR)
|
||||
.appendField(new Blockly.FieldDropdown([
|
||||
[Blockly.Msg.COLOUR_RGB_RED,"red"],
|
||||
[Blockly.Msg.COLOUR_RGB_GREEN,"green"],
|
||||
[Blockly.Msg.COLOUR_RGB_BLUE,"blue"],
|
||||
[Blockly.Msg.COLOUR_YELLOW,"yellow"],
|
||||
[Blockly.Msg.COLOUR_CYAN,"cyan"],
|
||||
[Blockly.Msg.COLOUR_RGB_PURPLE,"purple"],
|
||||
[Blockly.Msg.COLOUR_BLACK,"black"],
|
||||
[Blockly.Msg.COLOUR_WHITE,"white"]
|
||||
]),"color");
|
||||
this.setInputsInline(true);
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
}
|
||||
};
|
||||
|
||||
export const REGISTER_NEW_FACE_SIMPLE = {
|
||||
init: function () {
|
||||
this.setColour(AI_LOCAL_GRAPH_HUE);
|
||||
this.appendValueInput('SUB')
|
||||
.appendField(Blockly.Msg.MIXLY_TENSORFLOW_MODEL)
|
||||
.setCheck("var");
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE + Blockly.Msg.MIXLY_SMARTCAMERA + Blockly.Msg.MIXLY_GET
|
||||
+ Blockly.Msg.register_a_new_face_in_the_database);
|
||||
this.appendValueInput("NAME")
|
||||
.appendField(Blockly.Msg.MICROPYTHON_HUSKYLENS_NAME);
|
||||
this.setOutput(true)
|
||||
this.setInputsInline(true);
|
||||
}
|
||||
};
|
||||
@@ -12,7 +12,7 @@ export const display_show_image = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -40,7 +40,7 @@ export const display_show_image_or_string_delay = {
|
||||
]), 'center')
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -304,7 +304,7 @@ export const display_shift = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
var thisBlock = this;
|
||||
this.setTooltip(function () {
|
||||
@@ -397,7 +397,7 @@ export const display_clear = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -1117,7 +1117,7 @@ export const onboard_tft_show_image_xy = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize );
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -1172,7 +1172,7 @@ export const onboard_tft_show_image_or_string_delay = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -1388,7 +1388,7 @@ export const onboard_tft_bright_point = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -1405,7 +1405,7 @@ export const onboard_tft_fill = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
@@ -1599,7 +1599,7 @@ export const onboard_tft_show_texts = {
|
||||
var version = Boards.getSelectedBoardKey()
|
||||
if (JSFuncs.getPlatform() === 'Python ESP32-S3') {
|
||||
this.appendValueInput('boolean')
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize + ':');
|
||||
.appendField( Blockly.Msg.MIXLY_synchronize);
|
||||
}
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
|
||||
Reference in New Issue
Block a user