WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Wolfram Language Home Page »

"ClickLocations" (Question Interface Type)

"ClickLocations"

provides an interface for selecting locations on a background.

Properties

  • In QuestionInterface ["ClickLocations",props], props is an Association that supports the following keys:
  • "Prompt" None text asking the user a question
    Background required image to place the items on
    "Count" Automatic number of items
    "Labels" None list with corresponding labels for each item

Corresponding AssessmentFunction

  • "ClickLocations" is not an automatically assigned interface type for an AssessmentFunction . It must be specified in QuestionInterface .
  • When the Background is an image, values in the AssessmentFunction correspond to pixel locations.
  • By default, the "Count" matches the length of the correct answer in the AssessmentFunction .
  • Clicking exact locations is not practical, therefore, a nonzero tolerance and a "ComparisonMethod" such as "Point" should be set in the AssessmentFunction .
  • Locations in the answer key should be given as lists of coordinate pairs: AssessmentFunction [{{{chx1, chy1}, {chx2, chy2},} 1},]]
  • When no "Labels" are provided, "ListAssessment" must be set to "AllElementsOrderless": AssessmentFunction [, <|"ComparisonMethod"->"Vector","ListAssessment" "AllElementsOrderless"|>, Tolerance tol]]
  • If "Labels" are provided, "ListAssessment" must be set to "AllElementsOrdered" and the "Labels" should match the order of locations in the AssessmentFunction : AssessmentFunction [, <|"ComparisonMethod"->"Vector","ListAssessment" "AllElementsOrdered"|>, Tolerance tol]]

Examples

open allclose all

Basic Examples  (3)

Create a click-locations question without assessment:

Create a click-locations question with assessment:

Create a click-locations question with labels. Use the coordinate tool to locate the missing labels in the image:

Scope  (2)

Use the Coordinates Tool to extract some pixel positions from an image:

Create a question object with assessment using the image and chosen locations:

Create an image for a geometry problem:

Use the Coordinates Tool to find positions, then create a question with labels, awarding 20 points for a correct answer:

Applications  (1)

Create an image containing many flags:

Find specific flags using the Coordinates Tool and create a question:

Possible Issues  (1)

The "Background" must be an Image :

Use Image or Rasterize to convert Graphics into an Image :

Interactive Examples  (1)

Find locations of several types of objects in an image:

Create a question generator with a click-locations question object using the location data:

See Also

QuestionInterface   QuestionObject   ImageCases   ImagePosition

Question Interface Types: DragCategorize   DragCompletion

Comparison Methods: Vector

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /