I am trying to get RM to determine the size of images it is looking at when applying machine learning. All of the images we deal with are PNG and the PNG specifications are located here:
https://www.w3.org/TR/PNG/#4Concepts.PNGImageLooking at the ASCI character for the RapidMiner logo located at
rapidminer-logo-retina.png the first 24 ASCII characters are
âPNG
IHDRôí
The image size is contained in the first chunk after IHDR
I use this process to extract the ASCII characters for the image size:
<?xml version="1.0" encoding="UTF-8"?><process version="8.2.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.2.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="web:get_webpage" compatibility="7.3.000" expanded="true" height="68" name="Get Page" width="90" x="112" y="136">
<parameter key="url" value="https://1xltkxylmzx3z8gd647akcdvov-wpengine.netdna-ssl.com/wp-content/uploads/2016/06/rapidminer-logo-retina.png"/>
<list key="query_parameters"/>
<list key="request_properties"/>
</operator>
<operator activated="true" class="text:write_document" compatibility="8.1.000" expanded="true" height="82" name="Write Document" width="90" x="246" y="136">
<parameter key="file" value="/Users/robinmeisel/Desktop/test.txt"/>
</operator>
<operator activated="true" class="text:documents_to_data" compatibility="8.1.000" expanded="true" height="82" name="Documents to Data" width="90" x="380" y="136">
<parameter key="text_attribute" value="text"/>
<parameter key="add_meta_information" value="false"/>
</operator>
<operator activated="true" class="cut" compatibility="8.2.000" expanded="true" height="82" name="Cut" width="90" x="514" y="136">
<parameter key="first_character_index" value="17"/>
<parameter key="last_character_index" value="24"/>
</operator>
<connect from_op="Get Page" from_port="output" to_op="Write Document" to_port="document"/>
<connect from_op="Write Document" from_port="document" to_op="Documents to Data" to_port="documents 1"/>
<connect from_op="Documents to Data" from_port="example set" to_op="Cut" to_port="example set input"/>
<connect from_op="Cut" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
The result for the above process is
ôí
How would you recommend converting this into image height and width?