ക്യാമറ#
ആമുഖം#
VEX AIR ഡ്രോണിൽ രണ്ട് വിഷൻ സെൻസറുകൾ ഉൾപ്പെടുന്നു, അവ അതിന്റെ ഓൺബോർഡ് ക്യാമറകളായി പ്രവർത്തിക്കുന്നു - ഒന്ന് മുൻവശത്തും ഒന്ന് താഴെയുമായി. പറക്കുമ്പോൾ ചിത്രങ്ങളും വീഡിയോയും പകർത്താൻ ഇവയ്ക്ക് കഴിയും. VEXcode AIR-ൽ, “ക്യാമറ” എന്ന വാക്ക് എല്ലായ്പ്പോഴും ഈ വിഷൻ സെൻസറുകളിൽ ഒന്നിനെയാണ് സൂചിപ്പിക്കുന്നത്. ഉദാഹരണത്തിന്, drone.camera.start_recording(FORWARD_CAMERA), camera വിഷൻ സെൻസറുകളെ സൂചിപ്പിക്കുന്നു, FORWARD_CAMERA മുൻവശത്തുള്ള ഒന്ന് തിരഞ്ഞെടുക്കുന്നു.
VEX AIR ഡ്രോൺ കൺട്രോളറിൽ നിന്ന് വീഡിയോ റെക്കോർഡിംഗുകളും ചിത്രങ്ങളും കൈമാറാൻ, കൺട്രോളർ നിങ്ങളുടെ കമ്പ്യൂട്ടറുമായി ബന്ധിപ്പിക്കുക. ഇത് ഒരു മാസ്-സ്റ്റോറേജ് ഉപകരണമായി (ഒരു USB ഡ്രൈവിന് സമാനമായത്) ദൃശ്യമാകും, ഇത് ഫയലുകൾ നേരിട്ട് പകർത്താൻ നിങ്ങളെ അനുവദിക്കുന്നു. ഒരു പ്രോജക്റ്റ് അവസാനിപ്പിച്ച ശേഷം, പകർത്താൻ ശ്രമിക്കുന്നതിന് മുമ്പ് ഡ്രോണിൽ നിന്ന് ഏതെങ്കിലും ചിത്രങ്ങളോ റെക്കോർഡിംഗുകളോ കൺട്രോളർ ഡൗൺലോഡ് ചെയ്യുന്നത് പൂർത്തിയാക്കുന്നതുവരെ ഒരു മിനിറ്റ് കാത്തിരിക്കുക.
ലഭ്യമായ എല്ലാ രീതികളുടെയും ഒരു ലിസ്റ്റ് താഴെ കൊടുക്കുന്നു:
പ്രവർത്തനങ്ങൾ
start_recording– ഒരു വിഷൻ സെൻസറിൽ നിന്ന് വീഡിയോ റെക്കോർഡ് ചെയ്യുന്നു.stop_recording– ഒരു വിഷൻ സെൻസറിൽ നിന്ന് റെക്കോർഡിംഗ് നിർത്തുന്നു.capture_image– ഒരു വിഷൻ സെൻസറിൽ നിന്ന് ഒരു ചിത്രം പകർത്തുന്നു.
മ്യൂട്ടേറ്ററുകൾ
show_camera– VEX AIR ഡ്രോൺ കൺട്രോളറിൽ തിരഞ്ഞെടുത്ത വിഷൻ സെൻസർ കാണിക്കുന്നു.hide_camera– കൺട്രോളറിലെ വിഷൻ സെൻസർ ഫീഡ് മറയ്ക്കുന്നു.set_overlay_reticle– ഓവർലേ റെറ്റിക്കിൾ കാണിക്കുന്നു അല്ലെങ്കിൽ മറയ്ക്കുന്നു.set_overlay_telemetry– ടെലിമെട്രി ഡാറ്റ കാണിക്കുന്നു അല്ലെങ്കിൽ മറയ്ക്കുന്നു.
നേടുന്നവർ
is_recording– വിഷൻ സെൻസർ റെക്കോർഡ് ചെയ്യുന്നുണ്ടോ എന്ന് നൽകുന്നു.get_recording_time– റെക്കോർഡിംഗിന് ചെലവഴിച്ച സമയം തിരികെ നൽകുന്നു.
പ്രവർത്തനങ്ങൾ#
start_recording#
start_recording നിർദ്ദിഷ്ട വിഷൻ സെൻസർ ഉപയോഗിച്ച് ഒരു റെക്കോർഡിംഗ് ആരംഭിക്കുന്നു.
റെക്കോർഡിംഗുകൾ കാണുന്നതും വീണ്ടെടുക്കുന്നതും സംബന്ധിച്ച വിവരങ്ങൾക്ക്, ഇവിടെ പോകുക.
ഉപയോഗം:
drone.camera.start_recording(camera)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
റെക്കോർഡ് ചെയ്യേണ്ട വിഷൻ സെൻസർ: |
# Press button 7 to end recording
def end_recording():
drone.camera.stop_recording(FORWARD_CAMERA)
drone.land()
controller.button7.pressed(end_recording)
# Record a video as you fly around
controller.screen.show_camera(FORWARD_CAMERA)
drone.take_off(climb_to=500)
drone.camera.start_recording(FORWARD_CAMERA)
while True:
# Move with controller
drone.move_with_vectors(
forward=controller.axis4.position(),
rightward=controller.axis3.position(),
upward=controller.axis1.position(),
rotation=controller.axis2.position()
)
wait(5, MSEC)
stop_recording#
stop_recording നിർദ്ദിഷ്ട വിഷൻ സെൻസറിന്റെ റെക്കോർഡിംഗ് നിർത്തുന്നു.
റെക്കോർഡിംഗുകൾ കാണുന്നതും വീണ്ടെടുക്കുന്നതും സംബന്ധിച്ച വിവരങ്ങൾക്ക്, ഇവിടെ പോകുക.
ഉപയോഗം:
drone.camera.stop_recording(camera)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
റെക്കോർഡിംഗ് നിർത്തേണ്ട വിഷൻ സെൻസർ: |
# Press button 7 to end recording
def end_recording():
drone.camera.stop_recording(FORWARD_CAMERA)
drone.land()
controller.button7.pressed(end_recording)
# Record a video as you fly around
controller.screen.show_camera(FORWARD_CAMERA)
drone.take_off(climb_to=500)
drone.camera.start_recording(FORWARD_CAMERA)
while True:
# Move with controller
drone.move_with_vectors(
forward=controller.axis4.position(),
rightward=controller.axis3.position(),
upward=controller.axis1.position(),
rotation=controller.axis2.position()
)
wait(5, MSEC)
capture_image#
capture_image നിർദ്ദിഷ്ട വിഷൻ സെൻസർ ഉപയോഗിച്ച് ഒരു ചിത്രം എടുക്കുന്നു.
പകർത്തിയ ചിത്രങ്ങൾ കാണുന്നതിനെക്കുറിച്ചും വീണ്ടെടുക്കുന്നതിനെക്കുറിച്ചുമുള്ള വിവരങ്ങൾക്ക്, ഇവിടെ പോകുക.
ഉപയോഗം:
drone.camera.capture_image(camera)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
ചിത്രമെടുക്കാനുള്ള വിഷൻ സെൻസർ: |
# Press button 7 to take pictures
def take_picture():
drone.camera.capture_image(FORWARD_CAMERA)
controller.button7.pressed(take_picture)
# Take pictures while you control the drone
controller.screen.show_camera(FORWARD_CAMERA)
drone.take_off(climb_to=500)
while True:
# Move with controller
drone.move_with_vectors(
forward=controller.axis4.position(),
rightward=controller.axis3.position(),
upward=controller.axis1.position(),
rotation=controller.axis2.position()
)
wait(5, MSEC)
മ്യൂട്ടേറ്ററുകൾ#
show_camera#
show_camera നിലവിലെ സ്ക്രീൻ മോഡ് നിർദ്ദിഷ്ട വിഷൻ സെൻസർ ഫീഡിലേക്ക് സജ്ജമാക്കുന്നു.
ഉപയോഗം:
controller.screen.show_camera(camera)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
പ്രദർശിപ്പിക്കേണ്ട വിഷൻ സെൻസർ ഫീഡ്: |
# Switch camera feeds after 3 seconds
controller.screen.show_camera(DOWNWARD_CAMERA)
wait(3, SECONDS)
controller.screen.show_camera(FORWARD_CAMERA)
hide_camera#
hide_camera നിർദ്ദിഷ്ട വിഷൻ സെൻസറിന്റെ ഫീഡ് മറയ്ക്കുന്നു.
ഉപയോഗം:
controller.screen.hide_camera()
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
ഈ രീതിക്ക് പാരാമീറ്ററുകൾ ഇല്ല. |
# Hide camera feed after 3 seconds
controller.screen.show_camera(FORWARD_CAMERA)
wait(3, SECONDS)
controller.screen.hide_camera()
set_overlay_reticle#
set_overlay_reticle ഓവർലേ റെറ്റിക്കിളിനെ പ്രാപ്തമാക്കുന്നു അല്ലെങ്കിൽ അപ്രാപ്തമാക്കുന്നു. ഒരു റെറ്റിക്കിൾ എന്നത് ക്രോസ്ഹെയർ പോലെയുള്ള ഒരു വിഷ്വൽ മാർക്കറാണ്, ഇത് വസ്തുക്കളെ ലക്ഷ്യമിടുന്നതിനോ വിന്യസിക്കുന്നതിനോ സഹായിക്കുന്നതിന് ക്യാമറയുടെ കാഴ്ചയിൽ ദൃശ്യമാകുന്നു.
ഡിഫോൾട്ടായി, ഒരു പ്രോജക്റ്റിന്റെ തുടക്കത്തിൽ റെറ്റിക്കിൾ ഓവർലേ True ആയി സജ്ജീകരിച്ചിരിക്കുന്നു, താഴേക്കുള്ള വിഷൻ സെൻസറിൽ മാത്രം.
Usage:
controller.screen.set_overlay_reticle(state)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
ഓവർലേ റെറ്റിക്കിളിന്റെ അവസ്ഥ: |
# Hide the reticle when not aligning to a landing area
controller.screen.show_camera(DOWNWARD_CAMERA)
drone.take_off(climb_to=500)
controller.screen.set_overlay_reticle(False)
while True:
# Move with controller
drone.move_with_vectors(
forward=controller.axis4.position(),
rightward=controller.axis3.position(),
upward=controller.axis1.position(),
rotation=controller.axis2.position()
)
wait(5, MSEC)
set_overlay_telemetry#
set_overlay_telemetry കൺട്രോളറിന്റെ സ്ക്രീനിൽ ഡ്രോണിന്റെ ടെലിമെട്രി ഡാറ്റയുടെ ദൃശ്യപരത പ്രാപ്തമാക്കുന്നു അല്ലെങ്കിൽ അപ്രാപ്തമാക്കുന്നു. ഒരു പ്രോജക്റ്റ് പറക്കുമ്പോഴോ പ്രവർത്തിപ്പിക്കുമ്പോഴോ ഡ്രോൺ നൽകുന്ന തത്സമയ ഡാറ്റയാണ് ടെലിമെട്രി.
ഡിഫോൾട്ടായി, ഒരു പ്രോജക്റ്റിന്റെ തുടക്കത്തിൽ ടെലിമെട്രി ഡാറ്റ ഓവർലേ True ആയി സജ്ജീകരിച്ചിരിക്കുന്നു.
Usage:
controller.screen.set_overlay_telemetry(state)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
ടെലിമെട്രി ഡാറ്റയുടെ അവസ്ഥ: |
# Clear the camera video for better visibility
controller.screen.show_camera(FORWARD_CAMERA)
drone.take_off(climb_to=500)
controller.screen.set_overlay_telemetry(False)
while True:
# Move with controller
drone.move_with_vectors(
forward=controller.axis4.position(),
rightward=controller.axis3.position(),
upward=controller.axis1.position(),
rotation=controller.axis2.position()
)
wait(5, MSEC)
ഗെറ്ററുകൾ#
is_recording#
is_recording എന്നത് ഒരു നിർദ്ദിഷ്ട വിഷൻ സെൻസർ നിലവിൽ റെക്കോർഡ് ചെയ്യുന്നുണ്ടോ എന്ന് സൂചിപ്പിക്കുന്ന ഒരു ബൂളിയൻ നൽകുന്നു.
True– നിർദ്ദിഷ്ട വിഷൻ സെൻസർ റെക്കോർഡുചെയ്യുന്നു.False– നിർദ്ദിഷ്ട വിഷൻ സെൻസർ റെക്കോർഡുചെയ്യുന്നില്ല.
ഉപയോഗം:
drone.camera.is_recording(camera)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
റെക്കോർഡിംഗ് നില പരിശോധിക്കുന്നതിനുള്ള വിഷൻ സെൻസർ: |
# Use button 7 to start and stop recording
def toggle_recording():
if drone.camera.is_recording(FORWARD_CAMERA):
drone.camera.stop_recording(FORWARD_CAMERA)
else:
drone.camera.start_recording(FORWARD_CAMERA)
controller.button7.pressed(toggle_recording)
# Make video recordings while you control the drone
controller.screen.show_camera(FORWARD_CAMERA)
drone.take_off(climb_to=500)
while True:
# Move with controller
drone.move_with_vectors(
forward=controller.axis4.position(),
rightward=controller.axis3.position(),
upward=controller.axis1.position(),
rotation=controller.axis2.position()
)
wait(5, MSEC)
get_recording_time#
get_recording_time എന്നത് ഒരു പ്രത്യേക വിഷൻ സെൻസർ ഒരു ദശാംശ (float) ആയി സെക്കൻഡുകളിൽ റെക്കോർഡ് ചെയ്ത സമയം നൽകുന്നു.
ഉപയോഗം:
drone.camera.get_recording_time(camera)
പാരാമീറ്ററുകൾ |
വിവരണം |
|---|---|
|
റെക്കോർഡിംഗ് സമയം പരിശോധിക്കുന്നതിനുള്ള വിഷൻ സെൻസർ: |
# Record a video for 10 seconds
controller.screen.show_camera(FORWARD_CAMERA)
drone.camera.start_recording(FORWARD_CAMERA)
drone.take_off(climb_to=500)
while not (drone.camera.get_recording_time(FORWARD_CAMERA)) >= 10:
wait(5, MSEC)
drone.camera.stop_recording(FORWARD_CAMERA)